Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unneed hashcount, add xxh3 8.33% faster #25

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

delaneyj
Copy link
Contributor

Per the name of the branch. Initially tried to incorporate roaring bitmaps. Was about 30% slower. This is down to matching the current code. If I did batch compares it might be faster but would look much different.

However, removed HashCount. In general use range as it allows the compiler to make optimizations.
Switch from FNV much higher quality (and faster xxh3).

goos: linux
goarch: amd64
pkg: github.com/starskey-io/starskey/bloomfilter
cpu: AMD Ryzen 9 6900HX with Radeon Graphics        
            │   old.txt   │               new.txt               │
            │   sec/op    │   sec/op     vs base                │
Add-16        69.74n ± 0%   66.99n ± 1%   -3.94% (p=0.000 n=25)
Contains-16   46.60n ± 1%   40.77n ± 1%  -12.51% (p=0.000 n=25)
geomean       57.01n        52.26n        -8.33%

            │   old.txt    │               new.txt               │
            │     B/op     │    B/op     vs base                 │
Add-16        0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=25) ¹
Contains-16   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=25) ¹
geomean                  ²               +0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

            │   old.txt    │               new.txt               │
            │  allocs/op   │ allocs/op   vs base                 │
Add-16        0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=25) ¹
Contains-16   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=25) ¹
geomean                  ²               +0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

@guycipher
Copy link
Member

Very good work @delaneyj .

@guycipher guycipher self-assigned this Jan 21, 2025
@guycipher guycipher merged commit 583c8f2 into starskey-io:master Jan 21, 2025
1 check passed
@delaneyj delaneyj deleted the roaring branch January 21, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants