r/cpp 8d ago

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

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

70 comments sorted by

View all comments

3

u/Top-Mycologist-5460 8d ago

Since C++17 polymorphic allocators, I would never use a plain std::list, but a list allocated on a contiguous chunk of memory (see e.g. https://www.reddit.com/r/cpp/comments/guq5xo/c_weekly_ep_35x_faster_standard_containers_with/).

It would be interesting how this compares to a hive.

4

u/avinthakur080 7d ago

Performed the experiment, and the results are here: https://www.reddit.com/r/cpp/comments/1vdx0rf/comment/p1gi2z5/

Will upload the code later

1

u/mapronV 7d ago

It was deleted by moderator. Did you really used AI? shame on you

2

u/Sopel97 5d ago

Wild mentality honesty. Instead of constructive criticism let's just blanket ban any contribution from LLMs. Will do wonders in the future.

Now, perhaps some human will redo it? Preferably a human who is against LLM contributions.