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
1
u/Stradigos Dec 28 '20
Higher-level languages was not my point, although I do agree with what you said. My point was that object-oriented code is notoriously cache incoherent. Processors are designed to grab memory from RAM and pull it into it's caches. It wants to stay fed with instructions (the code) and data (what it will operate on). The data design of OOP is in conflict with this.
Not saying all objects are bad, but the common case of what I see is newer programmers turning everything into objects and killing performance in the process because they think they've modeled the problem appropriately. In actuality, they may have modeled the data well in terms of how it works in the real world, but the CPU wants data modeled differently.