logoalt Hacker News

zellynyesterday at 9:46 PM1 replyview on HN

The one that comes to mind is how big your hash maps have to get before all the clever algorithms beat linear scan, and it's surprisingly large on modern computers: linear memory access is _very_ predictable.

The Roc and Zig folks probably have actual numbers.


Replies

tshaddoxyesterday at 10:33 PM

What are these surprisingly large numbers you've seen? I thought that linear scan optimizations are typically reserved for pretty small maps, like dozens or maybe hundreds of elements.

show 1 reply