3 ms·
Abstraction in general comes at a cost.
by halayli 14y ago
Abstraction in general comes at a cost.
- tsahyt 14y agoObviously, yes. One can't expect jumps across multiple levels of libraries, wrappers and APIs to be free of cost. That's what Carmack referred to as "20 layers of crap". He's effectively right about it. On the other hand we can't reinvent the wheel everything we write a line of code. One of the most important aspects of balancing productivity with performance is knowing which parts of code are crucial to performance and should be written with that in mind. That's one of the toughest parts as well. Usually one is better off profiling than guessing but I believe an educated guess can go a long way nevertheless.
- IsTom 14y agoThat's true and the thing with C++ is that its philosophy is "if you don't use a feature, you're not getting performance hit associated with it". Be it anonymous functions or virtual calls.