3 ms·
How can "C++ still seems to be slower" if C (or C++) is essentially a macro-assembler, i.e. you're free to hand-optimize any particular bottleneck. Every time
by tx 18y ago
How can "C++ still seems to be slower" if C (or C++) is essentially a macro-assembler, i.e. you're free to hand-optimize any particular bottleneck.
Every time I hear someone say (or show a benchmark) where "C++ is slower than C" it always comes down to some STL usage instead of flat arrays or something (which is still valid C++)
- KirinDave 18y agoSure, but the whole point of using a higher level language is to use some of those higher level features. It seems somewhat... unfair to argue that C++ "can be fast" so long as you basically restrict it to its C subsets. I want the code to be both high level and fast. A language is of no use to me as a performance target if in order to get performance with it you have to use a tony subset of it. Sure, every language has fast and slow ways of doing things