• Robert Griesemer's avatar
    math/bits: much faster ReverseBytes, added respective benchmarks · ddb15cea
    Robert Griesemer authored
    Measured on 2.3 GHz Intel Core i7, running maxOS 10.12.3.
    
    benchmark                     old ns/op     new ns/op     delta
    BenchmarkReverseBytes-8       11.4          3.51          -69.21%
    BenchmarkReverseBytes16-8     6.87          0.64          -90.68%
    BenchmarkReverseBytes32-8     7.79          0.65          -91.66%
    BenchmarkReverseBytes64-8     11.6          0.64          -94.48%
    
    name              old time/op  new time/op  delta
    ReverseBytes-8    11.4ns ± 0%   3.5ns ± 0%   ~     (p=1.000 n=1+1)
    ReverseBytes16-8  6.87ns ± 0%  0.64ns ± 0%   ~     (p=1.000 n=1+1)
    ReverseBytes32-8  7.79ns ± 0%  0.65ns ± 0%   ~     (p=1.000 n=1+1)
    ReverseBytes64-8  11.6ns ± 0%   0.6ns ± 0%   ~     (p=1.000 n=1+1)
    
    Change-Id: I67b529652b3b613c61687e9e185e8d4ee40c51a2
    Reviewed-on: https://go-review.googlesource.com/37211
    Run-TryBot: Robert Griesemer <gri@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    ddb15cea
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...