Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto/types: optimize compact bit array one count (#9216)
By using bits.OnesCount8 instead of bitwise operations. Benchmark result on Apple M1: name old time/op new time/op delta NumTrueBitsBefore/new-8 88.5ns ± 1% 9.1ns ± 0% -89.68% (p=0.000 n=10+10) name old alloc/op new alloc/op delta NumTrueBitsBefore/new-8 0.00B 0.00B ~ (all equal) name old allocs/op new allocs/op delta NumTrueBitsBefore/new-8 0.00 0.00 ~ (all equal) Fixes #9125
- Loading branch information