mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
stage1: reimplement HashMap
The indexes are stored separately using an array of uint8_t, uint16_t, uint32_t, or size_t, depending on the number of entries in the map. Entries only contain a key and a value, no longer have distance_from_start_index or is_used. In theory this should be both faster and use less memory. In practice it seems to have little to no effect. For the standard library tests, vs master branch, the time had no discernable difference, and it shaved off only 13 MiB of peak rss usage.
This commit is contained in:
parent
6f98ef09e3
commit
8b82c40104
2 changed files with 199 additions and 131 deletions
Loading…
Add table
Add a link
Reference in a new issue