From 5f74bbc9793594ae8a4ba705e3acd46f9466cf76 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 16 Oct 2019 14:50:31 +0300 Subject: [PATCH] Update benchmark result in README.md Also simplify test's and benchmark's names. --- README.md | 10 ++++++---- tz/hash_test.go | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 97c0385..055fdaf 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,14 @@ The example of how it works can be seen in tests. # Benchmarks -## AVX vs AVX2 version +## go vs AVX vs AVX2 version ``` -BenchmarkAVX-8 500 3492019 ns/op 28.64 MB/s 64 B/op 4 allocs/op -BenchmarkAVX2-8 500 2752693 ns/op 36.33 MB/s 64 B/op 2 allocs/op -BenchmarkAVX2Inline-8 1000 1877260 ns/op 53.27 MB/s 64 B/op 2 allocs/op +BenchmarkSum/AVX_digest-8 308 3889484 ns/op 25.71 MB/s 5 allocs/op +BenchmarkSum/AVXInline_digest-8 457 2455437 ns/op 40.73 MB/s 5 allocs/op +BenchmarkSum/AVX2_digest-8 399 3031102 ns/op 32.99 MB/s 3 allocs/op +BenchmarkSum/AVX2Inline_digest-8 602 2077719 ns/op 48.13 MB/s 3 allocs/op +BenchmarkSum/PureGo_digest-8 68 17795480 ns/op 5.62 MB/s 5 allocs/op ``` # Contributing diff --git a/tz/hash_test.go b/tz/hash_test.go index 8dd7214..43ce8a9 100644 --- a/tz/hash_test.go +++ b/tz/hash_test.go @@ -57,7 +57,7 @@ var testCases = []struct { func TestHash(t *testing.T) { for i := range providers { p := providers[i] - t.Run("test "+p.String()+" digest", func(t *testing.T) { + t.Run(p.String()+" digest", func(t *testing.T) { d := NewWith(p) for _, tc := range testCases { d.Reset() @@ -86,7 +86,7 @@ func BenchmarkSum(b *testing.B) { for i := range providers { p := providers[i] - b.Run("bench"+p.String()+"digest", func(b *testing.B) { + b.Run(p.String()+" digest", func(b *testing.B) { b.ResetTimer() b.ReportAllocs() d := NewWith(p)