Skip to main content

MAX_KEYS

Constant MAX_KEYS 

Source
const MAX_KEYS: usize = 4096;
Expand description

Beyond this many distinct keys the map stops being a rounding error on the block and a block that diverse prunes little anyway. Past it we write nothing, which the reader reads as “scan me”.

4,096 entries is 160 KB, against bloom’s 1M-key ceiling: the two are sized differently on purpose, because a Bloom filter degrades into false positives as it fills and this degrades into a linear amount of disk.