llvm
9dfcf766 - [StringMap] Replace tombstone deletion with TAOCP 6.4 Algorithm R (#202103)

Commit
9 hours ago
[StringMap] Replace tombstone deletion with TAOCP 6.4 Algorithm R (#202103) 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
Author
Parents
Loading