Recent LLVM hash table improvements (opens in new tab)  ⚙️Compilers

LLVM had several hash tables using quadratic probing with in-band sentinel keys (empty, tombstone). DenseMap (replacement for std::unordered_map): DenseMapInfo::getEmptyKey() / getTombstoneKey(). SmallPtrSet (replacement for std::unordered_set ): hard-coded -1 (empty) and -2 (tombstone). StringMap (replacement for std::unordered_map ) Pointers, references, and iterators are invalidated by both insert. std::unordered_map, being node-based, keeps surviving-element pointers va...

Read the original article
Sign in to keep reading the full article.

Cited by 1 article

llvmweekly.org·

Keyboard Shortcuts

Navigation

Next / previous item
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help