Report benchmark results in MB/s

This commit is contained in:
Evgenii 2019-07-10 12:05:43 +03:00
parent 62a3dafe71
commit bd43de6056
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) {