fmt/include
Avi Kivity e589a16ecb
Look up sparse enum identifiers in a hash table instead of a linear search (#4899)
Enums that are too sparse for the index table were formatted by scanning
all enumerators. Replace the scan with an open-addressed hash table with
linear probing, sized to the smallest power of two that keeps the load
factor at or below 0.5. This guarantees a free slot, which terminates the
probe sequence and doubles as the not-found result because identifiers
are never empty.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-29 07:47:28 -07:00
..
fmt Look up sparse enum identifiers in a hash table instead of a linear search (#4899) 2026-08-29 07:47:28 -07:00