Billion-query-per-second lookup tables in C++
0 comments · c++, programming
- Comments7
0 comments · c++, programming
Story details from Lobsters ↗ · linked article on lemire.me.
Billion-query-per-second lookup tables in C++ was first seen by Trendoday on Oct 28, 2026. Since then it has appeared in 58 checks on 3 different days. It reached #8 on Lobsters · Hottest on Oct 28, 2026 UTC. It was last seen on Lobsters · Hottest on Oct 31, 11:51 UTC. The same link also trended on Hacker News, which raises its cross-platform score.
Best recorded rank on Lobsters · Hottest per UTC day.
Best rank per day (UTC).
| List | Best | Days | Checks | Last seen |
|---|---|---|---|---|
| Lobsters · Hottest | #8 · Badge | 3 | 58 | |
| YHacker News · Front page Billion-query-per-second lookup tables in C++ | same link | |||
A few top-level comments from Lobsters, shortened. Read the full thread on Lobsters.
For the article's key set {"GET", "POST", "PUT", "DELETE", "PATCH"} you can use the perfect hash function (0x13340001u * (n ^ s[0])) >> 29 into {0, 1, ..., 7}, assuming the length n is provided with s and s[n] is 0 (so that unconditionally indexing s[0] gives a well-defined value). That's 5 cycles of latency on…
> Reading past the end of a buffer is fine as long as you do not cross into another memory page, and pages are at least 4 kilobytes. No, reading past the end of a buffer is UB no matter what.
It's fine at the level of the concrete machine (if you know the architecture and take precautions like avoiding page crossings), not the abstract machine. In practice that means you have to do it with inline (or out-of-line) assembly to avoid UB, which is how you implement a fast strlen. But to your point and what…
Archived daily, weekly and monthly lists that include this entry.
Not at the moment. Its last recorded appearance was on Oct 31, 11:51 UTC.
#8 on Oct 28, 2026 UTC.
It was first seen on Oct 28, 2026 and has been on the list on 3 days (58 checks) since.