3 ms·
> For example, one cache miss might take as much time as a hundred add instructions. > Today's languages contain far too many features that do almost the same
by bcrosby95 7y ago
> For example, one cache miss might take as much time as a hundred add instructions.
> Today's languages contain far too many features that do almost the same thing but have slightly different performance characteristics, for example regular and virtual functions in C++.
Odd example. Virtual functions help enable certain designs, but avoiding virtual functions is commonly recommended when writing cache friendly code.
- spaced-out 7y agoHonestly it really hurts the author's credibility. Virtual functions hurt performance (generally not significantly) but allow for OOP design, in theory to make the program structure more clear/organized. Exactly what the author is supposedly advocating.