# cargo test --release --features bench-mphf -- --ignored --nocapture hash_quality
# lexindex 2.0.0 at c597099 plus the battery itself, 2026-09-11, arz (Ryzen 7 5800HS, Zen 3), rustc 1.98.1
#
# Every number is a standard-normal z (chi-square through Wilson-Hilferty). The bound is 6,
# which is a 1e-9 tail per cell; the battery runs ~44 000 avalanche cells and 40 tables, so the
# largest |z| here should sit near sqrt(2 ln N) ~ 4.6, and does.

lexindex hash quality — bound |z| < 6

corpus source: /usr/share/dict/words plus generated families

avalanche (strict, 8192 keys per cell, 5 lengths, both hashes)
  worst |z|   4.49   fingerprint len 24 in-bit 78 out-bit 29

bit independence (2048 keys, 16-byte keys, slot hash)
  worst |z|   4.23   in-bit 102 out-bits (4,50)

two-byte differential (24-byte keys, 2048 bases per combo)
  17664 combos, worst double collision 0/2048   none

per corpus (n = 100 000 where the family allows it)
  family           n   coll   z top12   z low12     z fp8   z joint
  words       100000      0      1.41      2.38      0.75      1.24
  bigrams     100000      0     -1.06      1.15      2.18     -0.52
  prefixed    100000      0      0.44     -0.29     -0.66     -0.60
  suffixed    100000      0      0.82     -0.45     -1.52      0.88
  numeric     100000      0     -0.48     -1.64      1.55      0.25
  decimal     100000      0      0.89     -1.13     -0.75      1.12
  uuid        100000      0      1.16      1.97      0.53      1.27
  cyrillic    100000      0      0.83      2.31     -1.04      0.78
  dna         100000      0     -0.82     -0.02     -1.03     -1.13
  paths       100000      0      0.68      1.03     -0.19      0.12

all cells within the bound
