5 ms·
Which is indicative of performance.
by capisce 14y ago
Which is indicative of performance.
- adamnemecek 14y agoBut isn't GCC still written mostly in C? So would not both gcc versions be expected to be very similar on instruction level?
- masklinn 14y ago> So would not both gcc versions be expected to be very similar on instruction level? It's going to go through the g++ frontend, parsing and compiling it using C++ semantics. There's no guarantee that the C subset of C++ will yield the exact same result as that of an actual C compiler. And a decade or two ago, as TFA notes, it most definitely did not.
- adamnemecek 14y agoI guess I just assumed that considering that both compilers are part of the same compiler collection that their output, while not guaranteed to be the same, can be expected to be somewhat similar. And that the divergences should not have all that much of an impact on execution speed. But I guess I did jump to a conclusion there.
- masklinn 14y agoThe backend should do the same thing, but if the C++ frontend gives complete garbage to the backend, I guess there's only so much the backend can do to fix the mess.