4 ms·
> even (or especially?) most C++ C++ hits the particularly nasty sweet spot of hiding boilerplate just enough that you have no idea what you're actually callin
by oddity 6y ago
> even (or especially?) most C++
C++ hits the particularly nasty sweet spot of hiding boilerplate just enough that you have no idea what you're actually calling while also not having a sophisticated JIT that can do escape analysis and other tricks to optimize that kind of code.
It doesn't help that, often, the default response to not having a clear understanding of resource ownership in a code-base is to make a copy.
I also find that people struggle to internalize the costs of memory allocation. These days, the default allocators on modern systems are fairly well tuned for crap code, and the cost of any one particular allocation is a complicated function of all the allocations that came before it. They're different orders of magnitude in the badness scale, but any one allocation never looks so bad, just like any one memory load/store never looks so bad.