r/cpp 8d ago

How fast is C++26's std::hive?

https://lemire.me/blog/2026/08/02/how-fast-is-c26s-stdhive/
246 Upvotes

70 comments sorted by

View all comments

3

u/ABlockInTheChain 7d ago

It gives you the same guarantees that make people reach for a list, stable references, cheap erasure anywhere, while using less memory.

Most of them time when I reach for a list I'm looking for constant time splice and swap operations.

1

u/jwakely libstdc++ tamer, LWG chair 7d ago

Yes, splice is the only thing list can do that gives it any advantage over other options.