[all-commits] [llvm/llvm-project] 9dfcf7: [StringMap] Replace tombstone deletion with TAOCP ...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Jun 9 04:36:30 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9dfcf7663b1604ae5ced030a69e2be0e93632d5e
https://github.com/llvm/llvm-project/commit/9dfcf7663b1604ae5ced030a69e2be0e93632d5e
Author: Fangrui Song <i at maskray.me>
Date: 2026-06-09 (Tue, 09 Jun 2026)
Changed paths:
M llvm/docs/ProgrammersManual.rst
M llvm/include/llvm/ADT/StringMap.h
M llvm/lib/Support/StringMap.cpp
M llvm/unittests/ADT/StringMapTest.cpp
M llvm/utils/gdb-scripts/prettyprinters.py
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list