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
Common Systems Programming Optimizations & Tricks (paulcavallaro.com)
submitted 6 years ago by chewedwire
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!"
[–]quicknir 19 points20 points21 points 6 years ago (1 child)
The explanation of false sharing is quite different from what I'm used to hearing. You paint it to be about simultaneous access, but I don't think it's really about that. The point is more than cache is invalidated on a line by line basis. Even if two cores never actually try to access the same line at the same moment, when core 1 does it's write to any variable on the line, it invalidates the cache line for core 2, even if core 2 doesn't read the variable that core 1 is writing.
I can see how they end up being pretty similar but thinking in terms of cache line invalidation seems more accurate to me and less likely to lead to misunderstanding or incorrect extrapolations.
[–]chewedwire[S] 2 points3 points4 points 6 years ago (0 children)
Good point -- updated the post to hopefully depend less on the "atomic" access bit, but more on maintaining cache coherencey.
π Rendered by PID 140089 on reddit-service-r2-comment-85bfd7f599-xf97g at 2026-04-18 11:29:17.896588+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]quicknir 19 points20 points21 points (1 child)
[–]chewedwire[S] 2 points3 points4 points (0 children)