Merge pull request #7 from nspcc-dev/feat/mbpers

Report benchmark results in MB/s
This commit is contained in:
fyrchik 2019-07-10 13:15:00 +03:00 committed by GitHub
commit 5c06a9fa8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -31,8 +31,8 @@ The example of how it works can be seen in tests.
## AVX vs AVX2 version ## AVX vs AVX2 version
``` ```
BenchmarkAVX-8 300 3566248 ns/op 64 B/op 4 allocs/op BenchmarkAVX-8 500 3579980 ns/op 27.93 MB/s 64 B/op 4 allocs/op
BenchmarkAVX2-8 500 2857174 ns/op 64 B/op 2 allocs/op BenchmarkAVX2-8 500 2997518 ns/op 33.36 MB/s 64 B/op 2 allocs/op
``` ```
# Contributing # Contributing

View file

@ -75,6 +75,7 @@ func BenchmarkAVX(b *testing.B) {
_, _ = d.Write(data) _, _ = d.Write(data)
d.checkSum() d.checkSum()
} }
b.SetBytes(int64(len(data)))
} }
func BenchmarkAVX2(b *testing.B) { func BenchmarkAVX2(b *testing.B) {
@ -88,6 +89,7 @@ func BenchmarkAVX2(b *testing.B) {
_, _ = d.Write(data) _, _ = d.Write(data)
d.checkSum() d.checkSum()
} }
b.SetBytes(int64(len(data)))
} }
func TestHomomorphism(t *testing.T) { func TestHomomorphism(t *testing.T) {