Commit 53e0653
committed
Moving kickout bucket selection to fastrandn
For faster initialization through avoiding mutex on global random.
Benchmark:
goos: linux
goarch: amd64
pkg: github.com/panmari/cuckoofilter
cpu: 12th Gen Intel(R) Core(TM) i7-1265U
│ master.bench │ fastrandn.bench │
│ sec/op │ sec/op vs base │
Filter_Insert-12 36.74n ± 3% 33.76n ± 1% -8.11% (p=0.000 n=100)1 parent d389eb2 commit 53e0653
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | | - | |
| 87 | + | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| |||
0 commit comments