Algorithms
Hash Tables Under the Hood
Hash Tables Under the Hood
07:41#hash-tables#data-structures#caching#performance
We dissect the hash table from the inside: what actually happens on a lookup, why the load factor is the only knob that matters, and how cache behavior dominates everything else.
Topics covered:
- The three operations: hash, index, probe — each with its own cost model
- Load factor and its exponential effect on open addressing
- Separate chaining vs. linear probing vs. Robin Hood vs. cuckoo hashing
- Cache misses: why a 1ns algorithm becomes 200ns with bad locality
- Size classes and object headers: the hidden overhead of small keys
- Hash function quality: when distribution matters and when it doesn't
- HashDoS: why random seeds protect against adversarial inputs
- Practical tuning: when to resize, when to switch strategy, when to cache the hash code
Related articles
algorithms
Hash Tables Aren't Magic
Load factors, collision strategies, and cache misses — why O(1) has a constant that bites when you least expect it.
5 min readRead
algorithms
Big-O Measures Scaling, Not Speed
O(n) says nothing about how fast your code is today — it predicts how it behaves as the input grows. What complexity analysis is really for, and when it misleads.
3 min readRead
backend
Connection Pools Aren't Free
Pool sizing, exhaustion, idle connections, and the hidden queue — why 'just add a pool' is incomplete advice.
5 min readRead
Depth, delivered weekly
One technical dispatch a week — articles and episode notes before they go public.
One technical dispatch per week. No noise.