crystal-community / bloom_filter Goto Github PK
View Code? Open in Web Editor NEWBloom filter implementation in Crystal lang
License: MIT License
Bloom filter implementation in Crystal lang
License: MIT License
Did you tested bloom_filter
in a large database?
icr(0.24.1) > bloom = BloomFilter.new_optimal(300_000_000, 1.0e-6); nil
=> nil
icr(0.24.1) > bloom.bytesize
=> 1078319068_u32
icr(0.24.1) > bloom.hash_num
=> 20_u8
when I insert about 15-20 millions records, i receive 100% false positive.
based on https://hur.st/bloomfilter - settings from .new_optimal
are correct.
Let's say now I have only 1000 elements, I choose hash_num = 4
to have false positive = 2%
(just an assume number). Later I add more 1000 elements, can I expand the byte size to keep hash_num and false positive unchanged. Of course without building the filter from scratch.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.