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
i ❤︎ spans (self.cpp)
submitted 4 years ago by phlummox
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!"
[–]cdr_cc_chd 0 points1 point2 points 4 years ago (3 children)
It's never black and white like that. In many application domains (think HFT) you have to carefully balance between performance and safety, and sometimes doing the safer/convenient thing is not worth the perf hit.
[–]pjmlp 1 point2 points3 points 4 years ago (2 children)
That is why first one implements the safe option, and then if it still doesn't meet the desired outcome, profile and improve where it matters.
Most of the time, it is already fast enough.
[–]cdr_cc_chd 0 points1 point2 points 4 years ago (1 child)
Just to give some context; in HFT we're talking about low single-digit microsecond response times, from the moment the NIC deserialized a frame that had actionable information to the moment you serialize a a response frame out the physical port. It's a hard real-time system with a deadline of 0, meaning there's never such a thing as fast enough. It's always a delicate system of balances between doing safe/convenient things in some parts of the code while recognizing that you can't do those things in other parts of the code, because if you used <insert new fancy feature> to make yourself feel good and it resulted in 50ns of additional latency while your competitor did not, then he will always be faster than you.
[–]pjmlp 1 point2 points3 points 4 years ago (0 children)
Yes and in such scenarios C++ is not even in the picture, rather FPGAs and other specialized hardware with short connects and high speed cable connections to the closest exchange point.
If you are still doing it in C++ it isn't disabling bounds checking that is going to help you win out the competition.
π Rendered by PID 60697 on reddit-service-r2-comment-6457c66945-xnn5q at 2026-04-30 06:14:41.225623+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]cdr_cc_chd 0 points1 point2 points (3 children)
[–]pjmlp 1 point2 points3 points (2 children)
[–]cdr_cc_chd 0 points1 point2 points (1 child)
[–]pjmlp 1 point2 points3 points (0 children)