4 ms·
From a practical point of view, in many cases the performance critical sections are tiny compared to the rest of the codebase. Imposing such a cognitive overhea
by pka 10y ago
From a practical point of view, in many cases the performance critical sections are tiny compared to the rest of the codebase. Imposing such a cognitive overhead on the programmer when 90% of the code are executed once a second just to make those 10% really really fast, and then screaming "performance!!!" is not very convincing. Just use a high-level language and drop to C when needed.
Anyway, the author later says he just enjoys writing low-level C++ code, however unpractical this may be. In which case I don't really see the point of defending his choice.
- panic 10y agoBut once you've optimized those sections, the rest of the performance problems are left scattered through your code. I've had to rewrite a system in C++ just a few weeks away from shipping because even after optimizing all the performance-critical sections, we still needed that extra 15% or so of "ambient" performance.
- malisper 10y ago> we still needed that extra 15% or so of "ambient" performance. This doesn't make sense to me. That 15% of time is spent somewhere. It certainly isn't just "ambient".
- panic 10y agoYes, it's spent carrying out the fundamental operations of the language (mostly method lookup and dispatch in this case).
- pka 10y agoSure, then you have a valid use case for C/C++ (even better, Rust!) But often people don't and still use C++.
- deleted 10y ago[deleted]