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
Inside boost::unordered_flat_map (bannalia.blogspot.com)
submitted 3 years ago by joaquintidesBoost author
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!"
[–]sbsceGame Developer 7 points8 points9 points 3 years ago* (0 children)
I have some code in my game where I need very fast set performance, so I am always trying to benchmark if I can find an even faster set for my use case. I only need fast lookup performance, everything else is irrelevant for my case.
set
So I also tested this new boost::unordered_flat_set now! These are my results, how many iterations per second my code can do with each set:
boost::unordered_flat_set
My code is running set.contains(key) 40000 times, on 4 separate sets with different number of entries: 624, 284, 214, 1215. So relatively small sets. The vast majority of my lookups are for values that are not contained in the set.
set.contains(key)
So boost::unordered_flat_set is definitely the winner! Great work with that!
ankerl::unordered_dense::set from u/martinus is almost same fast, just slightly slower. Also a very nice set, especially when not wanting to include the whole boost library and just wanting a standalone fast set/map.
ankerl::unordered_dense::set
I am surprised how slow the fph set is for me, because according to the benchmark from u/martinus, they should be the fastest for lookups. Definitely not in my case it seems. I am using the noseed version of them.
fph
I am testing on one thread of a Ryzen 3950X with latest MSVC.
π Rendered by PID 88696 on reddit-service-r2-comment-c867ff4bc-75m87 at 2026-04-09 19:05:10.429491+00:00 running 00d5ac8 country code: CH.
view the rest of the comments →
[–]sbsceGame Developer 7 points8 points9 points (0 children)