-
Notifications
You must be signed in to change notification settings - Fork 17.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto/internal/fips140/edwards25519/field: optimize AMD64
Replace constant multiplication with shift and adds, this reduces pressure on multiplications, making things overall faster. goos: windows goarch: amd64 pkg: crypto/internal/fips140/edwards25519/field cpu: AMD Ryzen Threadripper 2950X 16-Core Processor │ v0.log~ │ v1.log~ │ │ sec/op │ sec/op vs base │ Add-32 4.768n ± 1% 4.763n ± 0% ~ (p=0.683 n=20) Multiply-32 20.93n ± 0% 19.48n ± 0% -6.88% (p=0.000 n=20) Square-32 15.88n ± 0% 15.00n ± 0% -5.51% (p=0.000 n=20) Invert-32 4.291µ ± 0% 4.072µ ± 0% -5.10% (p=0.000 n=20) Mult32-32 5.184n ± 0% 5.169n ± 0% -0.30% (p=0.032 n=20) Bytes-32 11.36n ± 0% 11.34n ± 0% ~ (p=0.106 n=20) geomean 27.15n 26.32n -3.06% Change-Id: I9c2f588fad29d89c3e6c712c092b32b66479f596 Reviewed-on: https://go-review.googlesource.com/c/go/+/652716 Reviewed-by: Filippo Valsorda <[email protected]> Reviewed-by: Junyang Shao <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Commit-Queue: Junyang Shao <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Auto-Submit: Filippo Valsorda <[email protected]>
- Loading branch information
Showing
2 changed files
with
127 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters