aboutsummaryrefslogtreecommitdiff
path: root/internal/hash/hash_log2_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hash/hash_log2_test.go')
-rw-r--r--internal/hash/hash_log2_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/hash/hash_log2_test.go b/internal/hash/hash_log2_test.go
index f4c8bf3..869edba 100644
--- a/internal/hash/hash_log2_test.go
+++ b/internal/hash/hash_log2_test.go
@@ -31,7 +31,12 @@ func TestLog2(t *testing.T) {
}
func BenchmarkLog2(b *testing.B) {
- for i := 0; i < b.N; i++ {
- log2(1024)
+ benchCases := []uint32{1, 1024}
+ for _, bc := range benchCases {
+ b.Run(fmt.Sprintf("log(%v)", bc), func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ log2(1024)
+ }
+ })
}
}