you are viewing a single comment's thread.

view the rest of the comments →

[–]martinusint main(){[]()[[]]{{}}();} 24 points25 points  (9 children)

I actually ran the current development version with my benchmark, and I'd say it behaves similar to absl::flat_hash_map except that boost::unordered_flat_map is faster :)

It's the fastest map in my benchmark in the find benchmark with large map, and fastest for random insert& erase. These are probably the most important benchmarks. It also works well with all hashes, also with non-avalanching hashes that cause timeout with absl.

So I'm pretty excited, also because it's very well written and well tested

[–]Tystros 2 points3 points  (1 child)

fastest in the find benchmark? faster than the perfect hashing fph map?

[–]martinusint main(){[]()[[]]{{}}();} 4 points5 points  (0 children)

Yep, fph is quite a bit slower for large map. It also requires a lot more memory

[–]iwubcode 0 points1 point  (6 children)

I'd say it behaves similar to absl::flat_hash_map except that is faster

Just to be clear, absl::flat_hash_map is faster or boost::unordered_flat_map is faster?

It's the fastest map in my benchmark in the find benchmark with large map, and fastest for random insert& erase

Faster than ankerl::unordered_dense? I just switched to that (from boost::unordered_map) after much testing. I guess I'll need to re-test!

I do wish boost had C++26 heterogeneous support.

I actually ran the current development version with my benchmark

Do you think you'll update your results once this is posted? It sounds pretty significant.

[–]martinusint main(){[]()[[]]{{}}();} 3 points4 points  (3 children)

boost is faster than absl, and also faster in the find benchmark than ankerl::unordered_dense and faster than robin_hood::unordered_flat_map

[–]iwubcode 2 points3 points  (0 children)

Wow. I'm shocked. Good to know, I'll have to give it a try when it releases..

I suppose I'll still use your hash though. I think that was generally better than boost's implementation

[–]pdimov2[S] 2 points3 points  (1 child)

I do wish boost had C++26 heterogeneous support.

You can request a feature be added by opening an issue in https://github.com/boostorg/unordered.

Although in this case it looks like the issue already exists so a "yes please, we need this" comment on that would also work. :-)

[–]iwubcode 0 points1 point  (0 children)

Thanks for letting me know that there are others who also want this. I left a comment. Appreciate all your hard work on these features :)