spaolacci / murmur3

Native MurmurHash3 Go implementation
BSD 3-Clause "New" or "Revised" License
955 stars 125 forks source link

Write benchmarks using sub-benchmarks #20

Closed cespare closed 6 years ago

cespare commented 6 years ago

While I'm at it, also add benchmarks for Sum64.

This changes the output lines from this:

Benchmark32_1-4                 200000000                9.00 ns/op      111.15 MB/s
Benchmark32_2-4                 200000000                9.69 ns/op      206.48 MB/s
Benchmark32_4-4                 100000000               10.2 ns/op       394.04 MB/s
Benchmark32_8-4                 100000000               12.0 ns/op       668.48 MB/s

to this:

Benchmark32/1-4         200000000                8.98 ns/op      111.30 MB/s
Benchmark32/2-4         200000000                9.46 ns/op      211.48 MB/s
Benchmark32/4-4         100000000               10.8 ns/op       370.43 MB/s
Benchmark32/8-4         100000000               12.6 ns/op       633.03 MB/s

but otherwise it's equivalent.

spaolacci commented 6 years ago

(squashed)

Thanks for your contribution. I somehow overlooked that sub-benchmarks feature, but diff is indeed really favorable :).

cespare commented 6 years ago

I somehow overlooked that sub-benchmarks feature

It's new as of Go 1.7 (so mid-2016).