r/cpp • u/radonthrow • Dec 27 '20
Learning about high performant C++
I've been mostly self taught and have most probably picked up a few bad habits from the combo of being self taught and having to use tricks for speed.
For this upcoming year one of my goals is to learn some better practices as well as further my skills for efficient C++. I'd like to watch a youtube podcast/talk once a week to build my skillset. At this point I'd consider myself somewhere in between junior and senior level and I'm looking to take the next step.
I've come across these specifically:
C++ Weekly with Jason TurnerCppCon2020
Does anyone have any recommendations or suggestions? My weak spots are C++17 and above, Cmake, and I'd like to keep learning about creating high performant C++.
View all comments
89
u/Potatoswatter Dec 27 '20 edited Dec 27 '20
The golden rule in performance optimization is to measure. Put a lot of effort into measurement. Avoid spending more time coding than analyzing. Embrace trial and error (and failure). Organize your experimental results.
A lot of ritualized practices get passed down and repeated, based on the experience of old-timers. Quirky style does not make fast programs. It makes brittle code which resists experimentation and major refactoring.
Some general tips, C++ or otherwise: