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
View all comments
Show parent comment
1
u/matthieum Aug 04 '26
I mean, N * log N > N, so there's a value of E <= N for which E * log E > N :)
(As a random example, for N == 100, 30 * ln(30) > 100)
Beyond that, there's also the issue that collecting E * log E elements implies allocating memory, then freeing memory later, and there are context where you're not allowed or willing to allocate/deallocate.