Code Monkey home page Code Monkey logo

bloom_filter's People

Contributors

benoist avatar funny-falcon avatar greyblake avatar jkthorne avatar veelenga avatar willhbr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bloom_filter's Issues

100% false positives

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.

Expand the filter without building from scratch

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.