Yea but all that function pointer indirection can actually hurt performance (especially caching), some things in C++ actually can be faster just because the compiler is better at optimizing for that.
Technically you’re right, but I don’t think that changes what I said about optimization. There are still cases where equivalent C++ code can be faster than the C version merely due to different optimizations used.
Yea but all that function pointer indirection can actually hurt performance (especially caching), some things in C++ actually can be faster just because the compiler is better at optimizing for that.
There is nothing you can do in C++ or C, that can’t be done in the other. It’s the kind of the point of those languages.
Technically you’re right, but I don’t think that changes what I said about optimization. There are still cases where equivalent C++ code can be faster than the C version merely due to different optimizations used.