Files
Fangrui Song a296bdef76 [StringMap] Replace tombstone deletion with TAOCP 6.4 Algorithm R () (#203354)
Reland #202103 after relanding "[StringMap] Invalidate iterators in
remove()" (#203249)

StringMap uses quadratic probing with lazy deletion: an erased entry
becomes a tombstone, a third bucket state alongside empty and live that
every find/insert must inspect.

Switch to linear probing with Knuth TAOCP 6.4 Algorithm R deletion,
similar to DenseMap #200595.

erase now relocates the following entries to close the hole. StringMap
buckets are pointers to heap-allocated entries, so only the pointers
(and the parallel hash array) move. References and pointers to entries
remain valid, but iterators are invalidated.

Depends on #202237 and #202520
Aided by Claude Opus 4.8
2026-06-11 18:29:41 +00:00
..