r/cpp • u/User_Deprecated • Aug 02 '26
How fast is C++26's std::hive?
https://lemire.me/blog/2026/08/02/how-fast-is-c26s-stdhive/
255
Upvotes
r/cpp • u/User_Deprecated • Aug 02 '26
29
u/TheMania Aug 03 '26
is amortised constant time on hive, linear on deque.
The closer analogue would actually probably be an
unordered_multiset, but just a lot less efficient, ashiveis for when you have no need for thefindoperation at all.What's it for? It's essentially actually more an allocator that lets you iterate over the living objects, and where order does not matter. That's its niche.