Coder Social home page Coder Social logo

Multiply Overflow in Fingerprint about bloom HOT 4 CLOSED

dcso avatar dcso commented on August 12, 2024
Multiply Overflow in Fingerprint

from bloom.

Comments (4)

0mbi avatar 0mbi commented on August 12, 2024 1

Very well, nice that things work as expected :-)

I guess that's a close then.

from bloom.

satta avatar satta commented on August 12, 2024

AFAICS this is observed correctly, but should not make a difference here as long as integer sizes are fixed (e.g. between architectures). Even with an overflow happening, fingerprint calculation is still deterministic and the distribution properties of the hash values (and hence bits) should also remain unchanged. @adewes any comments on that?

from bloom.

adewes avatar adewes commented on August 12, 2024

Howdie @satta & @0mbi :D I checked it back when I implemented it but found that it didn't change the collission probability so I left it (as otherwise we'd need to use a modular arithmetic library or implement our own, which would make the whole thing much slower). In the Python version (which supports big integers out of the box) we also truncate the multiplication result before performing the modulo, so it's compatible to the Golang version (https://github.com/DCSO/flor/blob/master/flor/filter.py#L113).

from bloom.

satta avatar satta commented on August 12, 2024

Thanks for being vigilant anyway :)

from bloom.

Related Issues (2)

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.