Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
CL 450055 replaced big.Int.BitLen with a portable constant-time operation for fear of bits.LeadingZeros using a lookup table on some architectures (notably not on x86, which uses a hardware instruction). @drchase's benchmarks found https://perf.golang.org/search?q=upload%3A20221130.13+pkg%3Agithub.com%2Fericlagergren%2Fdecimal%2Fbenchmarks, non-crypto code with a significant performance hit for a property (constant-time) it didn't need.
Talked to @FiloSottile, and he is going to send a CL removing use of big.Int.BitLen from crypto code and restoring the old implementation.
Filing issue so we remember to submit the CL before the release.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Change https://go.dev/cl/454617 mentions this issue: math/big: fix BitLen performance regression
math/big: fix BitLen performance regression
Fix confirmed on https://perf.golang.org/dashboard/?benchmark=Pi%2Ffoo%3Dericlagergren_%28Go%29%2Fprec%3D100-8&days=60&end=2022-12-21T16%3A46
No branches or pull requests