]>
Cypherpunks repositories - gostls13.git/commit
math/bits: much faster Reverse, added respective benchmarks
Measured on 2.3 GHz Intel Core i7, running maxOS 10.12.3.
name old time/op new time/op delta
Reverse-8 76.6ns ± 0% 8.1ns ± 0% ~ (p=1.000 n=1+1)
Reverse8-8 12.6ns ± 0% 0.6ns ± 0% ~ (p=1.000 n=1+1)
Reverse16-8 20.8ns ± 0% 0.6ns ± 0% ~ (p=1.000 n=1+1)
Reverse32-8 36.5ns ± 0% 0.6ns ± 0% ~ (p=1.000 n=1+1)
Reverse64-8 74.0ns ± 0% 6.4ns ± 0% ~ (p=1.000 n=1+1)
benchmark old ns/op new ns/op delta
BenchmarkReverse-8 76.6 8.07 -89.46%
BenchmarkReverse8-8 12.6 0.64 -94.92%
BenchmarkReverse16-8 20.8 0.64 -96.92%
BenchmarkReverse32-8 36.5 0.64 -98.25%
BenchmarkReverse64-8 74.0 6.38 -91.38%
Change-Id: I6b99b10cee2f2babfe79342b50ee36a45a34da30
Reviewed-on: https://go-review.googlesource.com/37149
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>