• Robert Griesemer's avatar
    math/bits: much faster Reverse, added respective benchmarks · 7d5c003a
    Robert Griesemer authored
    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: 's avatarMatthew Dempsky <mdempsky@google.com>
    7d5c003a
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...