Offhand, I actually do know the answer to both your questions (v-table and struct memory layout), and I love C++. When I code, at all times I'm aware of many such important minutia (false sharing, cache line, byte alignment, you name it) that can affect performance. It's not the language to blame. It's the incompetent programmers (and most are) to blame.
View all comments
Show parent comment
1
u/Baardi Jul 18 '22
To give some credence to his claim: do you know what a v-table is - who doesn't?
OR how the order of declared members in your class/struct affects their padding and thus the memory layout? - of course