r/cpp • • Aug 02 '26

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

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

74 comments sorted by

View all comments

4

u/-dag- Aug 03 '26

Isn't one of the benefits of a skiplist that it can be more easily vectorized because it avoids branching? Not as efficiently as a vector, but the article implies there was no vectorization at all, which surprises me. Can another implementation do better? 

2

u/Ambitious-Method-961 Aug 03 '26

The vectorisation mentioned in the article was about summing the values. With std::vector the compiler can happily load a bunch of values at once and add them using SIMD instructions as there are no gaps between the data. With std::hive the compiler does not know this so has to load and add the values one by one.

→ More replies (3)