jedisct1 / rust-bloom-filter

A fast Bloom filter implementation in Rust
BSD 2-Clause "Simplified" License
235 stars 51 forks source link

multiplication in u128 before mod 0xffffffffffffffc5 #21

Closed amishaa closed 4 years ago

amishaa commented 4 years ago

After you make wrapping_mul (=multiplication + mod 264) it does not make much sense to take mod 264-57 (in most cases the second will take no effect at all). As a result, for example, all entities have exactly k/2 odd and k/2 even coordinates. It damages guarantees a bit.