mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Correct bloom hash bitpacking documentation
The two 12 bit keys add to 24 bits, which leaves 8 bits free in each word. (And 8 * 3 = 24, to pack in the fourth hash.)
This commit is contained in:
parent
efed75ae5a
commit
288143fadf
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
|||
use fnv::FnvHasher;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
// The top 12 bits of the 32-bit hash value are not used by the bloom filter.
|
||||
// The top 8 bits of the 32-bit hash value are not used by the bloom filter.
|
||||
// Consumers may rely on this to pack hashes more efficiently.
|
||||
pub const BLOOM_HASH_MASK: u32 = 0x00ffffff;
|
||||
const KEY_SIZE: usize = 12;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue