lucky(~/go/src/pkg/bytes) % go test -c
lucky(~/go/src/pkg/bytes) % ./bytes.test -test.run=XXX
-test.bench=Index -test.cpuprofile=cpu.out
PASS
BenchmarkIndexByte32 200000000 8.23 ns/op 3887.42 MB/s
BenchmarkIndexByte4K 10000000 264 ns/op 15473.34 MB/s
BenchmarkIndexByte4M 10000 249057 ns/op 16840.68 MB/s
BenchmarkIndexByte64M 500 3989244 ns/op 16822.45 MB/s
BenchmarkIndexBytePortable32 50000000 45.6 ns/op
702.25 MB/s
BenchmarkIndexBytePortable4K 1000000 2618 ns/op
1564.52 MB/s
BenchmarkIndexBytePortable4M 1000 2659567 ns/op
1577.06 MB/s
BenchmarkIndexBytePortable64M 50 42553580 ns/op
1577.04 MB/s
BenchmarkIndex32 10000000 222 ns/op 143.77 MB/s
BenchmarkIndex4K 50000 38103 ns/op 107.50 MB/s
BenchmarkIndex4M 50 38845263 ns/op 107.97 MB/s
BenchmarkIndex64M 5 622904900 ns/op 107.74 MB/s
BenchmarkIndexEasy32 50000000 45.6 ns/op 702.37 MB/s
BenchmarkIndexEasy4K 5000000 304 ns/op 13437.60 MB/s
BenchmarkIndexEasy4M 10000 250816 ns/op 16722.61 MB/s
BenchmarkIndexEasy64M 500 3980612 ns/op 16858.93 MB/s
lucky(~/go/src/pkg/bytes) % go tool pprof bytes.test cpu.out
Welcome to pprof! For help, type 'help'.
(pprof) top10
Total: 3992 samples
1686 42.2% 42.2% 1686 42.2% bytes.IndexByte
978 24.5% 66.7% 978 24.5% bytes.indexBytePortable
626 15.7% 82.4% 1920 48.1% bytes.Index
379 9.5% 91.9% 379 9.5% runtime.memeqbody
151 3.8% 95.7% 530 13.3% bytes.Equal
138 3.5% 99.1% 2038 51.1% bytes_test.bmIndexByte
22 0.6% 99.7% 904 22.6% bytes_test.bmIndexEasy
11 0.3% 100.0% 1045 26.2% bytes_test.bmIndex
1 0.0% 100.0% 1 0.0% scanblock
0 0.0% 100.0% 244 6.1% bytes_test.BenchmarkIndex32
(pprof)