Skip to content

Speed up BytesMontgomery#47

Merged
FiloSottile merged 2 commits intoFiloSottile:mainfrom
AlexanderYastrebov:speedup-bytes-montgomery
Jan 26, 2025
Merged

Speed up BytesMontgomery#47
FiloSottile merged 2 commits intoFiloSottile:mainfrom
AlexanderYastrebov:speedup-bytes-montgomery

Conversation

@AlexanderYastrebov
Copy link
Contributor

Speed up BytesMontgomery by eliminating Invert and Multiply.

goos: linux
goarch: amd64
pkg: filippo.io/edwards25519
cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
                  │   HEAD~1    │                HEAD                 │
                  │   sec/op    │   sec/op     vs base                │
BytesMontgomery-8   7.264µ ± 1%   3.670µ ± 0%  -49.48% (p=0.000 n=10)

Speed up BytesMontgomery by eliminating Invert and Multiply.

goos: linux
goarch: amd64
pkg: filippo.io/edwards25519
cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
                  │   HEAD~1    │                HEAD                 │
                  │   sec/op    │   sec/op     vs base                │
BytesMontgomery-8   7.264µ ± 1%   3.670µ ± 0%  -49.48% (p=0.000 n=10)
@FiloSottile
Copy link
Owner

Ah that makes sense, thank you!

@FiloSottile FiloSottile merged commit 1304095 into FiloSottile:main Jan 26, 2025
2 checks passed
@AlexanderYastrebov AlexanderYastrebov deleted the speedup-bytes-montgomery branch January 26, 2025 21:01
AlexanderYastrebov added a commit to AlexanderYastrebov/wireguard-vanity-key that referenced this pull request Jan 26, 2025
Update to the latest version to include speedup
added by FiloSottile/edwards25519#47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants