4 ms·
> Any snippet of C-code is transparent in that you know roughly how it is going to be translated into machine code. This isn't really true on a modern optimizi
by umanwizard 9y ago
> Any snippet of C-code is transparent in that you know roughly how it is going to be translated into machine code.
This isn't really true on a modern optimizing compiler.
- phamilton 9y agoPrecisely. As someone who's tried to duel a compiler for performance, -O3 has very little resemblance to anything I've ever written, and outperforms what I've written significantly.
- plpot 9y agoBut this will never be true in any low level language. You can spend a lot of time optimizing any single line of code manually, but software will always be faster than you. And will optimize any code you write beyond recognition.
- waynecochran 9y agoYou still have a good idea of what can get inlined, where loop unrolling can occurs, constant folding, etc.... if you have any assembly experience you still have a good idea of what machine could can be generated.