aboutsummaryrefslogtreecommitdiff
path: root/internal/hash/log2.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hash/log2.go')
-rw-r--r--internal/hash/log2.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/internal/hash/log2.go b/internal/hash/log2.go
deleted file mode 100644
index 8ba79df..0000000
--- a/internal/hash/log2.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package hash
-
-var tab32 = [32]uint32{
- 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
- 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31,
-}
-
-func log2(value uint32) uint32 {
- value |= value >> 1
- value |= value >> 2
- value |= value >> 4
- value |= value >> 8
- value |= value >> 16
- return tab32[(value*0x07c4acdd)>>27]
-}