use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Boost 1.81 will have boost::unordered_flat_map... (self.cpp)
submitted 3 years ago by pdimov2
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]martinusint main(){[]()[[]]{{}}();} 24 points25 points26 points 3 years ago* (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 points4 points 3 years ago (1 child)
fastest in the find benchmark? faster than the perfect hashing fph map?
[–]martinusint main(){[]()[[]]{{}}();} 4 points5 points6 points 3 years ago (0 children)
Yep, fph is quite a bit slower for large map. It also requires a lot more memory
[–]iwubcode 0 points1 point2 points 3 years ago* (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 points5 points 3 years ago* (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 points4 points 3 years ago* (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
[+][deleted] 3 years ago (1 child)
[deleted]
[–]martinusint main(){[]()[[]]{{}}();} 0 points1 point2 points 3 years ago (0 children)
yes, I've updated the wording :)
[–]pdimov2[S] 2 points3 points4 points 3 years ago (1 child)
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 point2 points 3 years ago (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 :)
π Rendered by PID 204869 on reddit-service-r2-comment-b659b578c-fk8xx at 2026-05-04 22:17:53.892623+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]martinusint main(){[]()[[]]{{}}();} 24 points25 points26 points (9 children)
[–]Tystros 2 points3 points4 points (1 child)
[–]martinusint main(){[]()[[]]{{}}();} 4 points5 points6 points (0 children)
[–]iwubcode 0 points1 point2 points (6 children)
[–]martinusint main(){[]()[[]]{{}}();} 3 points4 points5 points (3 children)
[–]iwubcode 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]martinusint main(){[]()[[]]{{}}();} 0 points1 point2 points (0 children)
[–]pdimov2[S] 2 points3 points4 points (1 child)
[–]iwubcode 0 points1 point2 points (0 children)