Generator

Bucket occupancy under three hashes, 192 keys in 256 buckets

Rendered here at the parameters it defaults to, with every essay that calls it — which is the same list as the blast radius of changing it.
Bucket occupancy under three hashes, 192 keys in 256 bucketsEach strip is the first 64 buckets, drawn as a column per bucket in proportion to how many keys landed in it, with the treeify threshold of 8 marked. a well-spread hash: longest bucket 4, worst lookup 4 chained and 4 treed · the low bits only: longest bucket 31, worst lookup 31 chained and 5 treed · every key collides: longest bucket 192, worst lookup 192 chained and 8 treed. The threshold is chosen so that under a hash worth using it never fires — the JDK's own comment puts the chance of a bucket reaching eight at about 6 × 10⁻⁸ — which makes it a mechanism whose entire value is in the case its author did not control.column height = keys in that bucket · line = threshold of 8a well-spread hashlongest 44 → 4worst lookupthe low bits onlylongest 3131 → 5worst lookupevery key collideslongest 192192 → 8worst lookup192 keys, 256 buckets, seed 20260811threshold 8, 64 buckets shown

Bucket occupancy under three hashes, 192 keys in 256 buckets

Each strip is the first 64 buckets, drawn as a column per bucket in proportion to how many keys landed in it, with the treeify threshold of 8 marked. a well-spread hash: longest bucket 4, worst lookup 4 chained and 4 treed · the low bits only: longest bucket 31, worst lookup 31 chained and 5 treed · every key collides: longest bucket 192, worst lookup 192 chained and 8 treed. The threshold is chosen so that under a hash worth using it never fires — the JDK's own comment puts the chance of a bucket reaching eight at about 6 × 10⁻⁸ — which makes it a mechanism whose entire value is in the case its author did not control.

Drawn at 700 × 278, wide on the page. Everything above is what bucket-occupancy returns with no arguments; the caption is the generator's own, computed from the numbers in the drawing rather than written beside it.

2 essays call bucket-occupancy. The drawing above is what it returns with no arguments at all; every call below passes it something, because a placement that passes nothing draws whichever member of the family the generator happens to default to rather than the one its essay argues about — which is what optcheck and figfill exist to catch.

Where it is called

Changing this generator changes every one of these figures.

The library, page 1 of 5 — where bucket-occupancy sits