-
Notifications
You must be signed in to change notification settings - Fork 22
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
Benchmarks? #3
Comments
Hi, When coding the library I created the various bucket size configurations so that they would be word-aligned, in order to ensure that a search requires a maximum of 2 reads from memory. Additionally, the code doesn't have superfluous runtime branching thanks to Zig's compile-time branch elision, like in the following piece of code https://github.com/kristoff-it/redis-cuckoofilter/blob/master/src/lib/zig-cuckoofilter.zig#L235-L245 The quoted loop is resolved as 2 or 4 statements (depending on the bucket size configuration) and the switch case is elided too, as it depends on a compile-time known value. If you want to know more about Zig's comptime, I wrote an article about it. So, going back to the benchmark idea, the code is very straightforward, Zig has D-style compile-time facilities, and it uses LLVM to compile, all of which, combined with the fact that a benchmark would not be directly comparable with any other implementation, made me avoid the subject entirely. If you are interested in doing some benchmarking, I'll be happy to quote (and properly attribute) any findings in the readme. About the client-side sync idea, to make it worthwhile, first we need client-side implementations of this cuckoo filter library. I started the work by separating the business logic in https://github.com/kristoff-it/zig-cuckoofilter and I've also included in the Once that's done, it shouldn't be too hard to wire everything together using a Redis Stream as a "commit log", for example. Unfortunately my attention is currently elsewhere so I don't have a real ETA on if / when I'll do it. That said, I'd be happy to see somebody else maintaining a language package for this cuckoo filter library. Sorry, I realize this is a willingness to help with 0/2 issues, but if you do start using the library and encounter any problem, I'll be happy to help you diagnose it. |
Are you planning to publish any basic benchmarks?
Also, nice project! The planned "advanced client-side sync" is also something we'd like to see.
The text was updated successfully, but these errors were encountered: