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
..
args.h Unify copyright notices 2026-05-31 08:54:06 -07:00
base.h Bump version 2026-07-29 11:04:35 -07:00
chrono.h fix out-of-range float to int conversion in to_nonnegative_int (#4802) 2026-06-16 23:14:58 -07:00
color.h Unify copyright notices 2026-05-31 08:54:06 -07:00
compile.h Fix FMT_COMPILE failure with format_as mapped types (Issue #4794) (#4836) 2026-07-12 09:21:55 -07:00
core.h Unify copyright notices 2026-05-31 08:54:06 -07:00
enum.h Look up sparse enum identifiers in a hash table instead of a linear search (#4899) 2026-08-29 07:47:28 -07:00
fmt-c.h Minor cleanup 2026-06-26 15:57:41 -07:00
format-inl.h Rename loc_copy to locale in locale helpers (#4876) 2026-08-10 09:12:29 -07:00
format.h Right-align inf and nan with a bare width (#4895) 2026-08-27 08:54:40 -07:00
os.h Unify copyright notices 2026-05-31 08:54:06 -07:00
ostream.h Remove extra newline 2026-07-25 07:52:08 -07:00
printf.h Unify copyright notices 2026-05-31 08:54:06 -07:00
ranges.h Fix compile time format for ranges, style, and std (#4759) 2026-05-31 08:21:35 -07:00
std.h Reject sign-aware zero padding in std::exception and error_code formatters 2026-08-16 10:00:41 -07:00
xchar.h Rename loc_copy to locale in locale helpers (#4876) 2026-08-10 09:12:29 -07:00