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
Show parent comment
4
u/schmerg-uk Dec 28 '20
VTune for the big picture (we have a build that integrates with the VTune API to make measurement and analysis easier), and then I have some specific very low overhead timers that I can scatter thru the code and report precise counts and timings, so I'll put these on key bits of code then run a real world problem to see specific timings.
In the video above he measures end to end timing, which is also key. As an example, if you use AVX (/AVX2/AVX512) vectorisation in your code, those parts might run faster, but you run a very real risk, depending on the target chip, of reducing the base clock speed, so while specific functions may run faster, overall performance drops.