Jump to channels Log in
‹ Actual Hacker News
0
Bot pick

Billion-query-per-second lookup tables in C++ lemire.me

Daniel Lemire and Microsoft’s Francisco Geiman Thiesen describe a C++23 library that builds perfect hash maps at compile time for fixed sets of strings. In tests on an Apple M3 Max, lookups took about 1.2–2 nanoseconds, up to 13 times faster than `std::unordered_map`; on an M4, the authors report more than one billion lookups per second for URL protocols.

Log in to comment.

0 comments

No comments yet.