Compiler optimizations
Sergey Gromov
snake.scaly at gmail.com
Fri Dec 19 03:16:02 PST 2008
Fri, 19 Dec 2008 03:56:37 +0000 (UTC), dsimcha wrote:
> Does anyone know of a decent guide that has information on what types of
> optimizations compilers typically perform and what they aren't capable of
> performing automatically? I figure it would be useful to know something like
> this because, when micro-optimizing performance-critical code, it's silly to
> do a low-level optimization that makes the code less readable if the
> compiler's already probably doing it. On the other hand, it would be nice to
> know exactly what optimizations (besides the obvious stuff like high-level
> design and algorithm optimizations) the compiler can't possibly be
> sufficiently smart to do, so I can spend time looking for opportunities to do
> those.
I'm afraid that your only option is to look at the assembly output and
then trick the compiler into making it better. Very subtle changes
make difference sometimes and I doubt you can pick this knowledge from
any manual.
More information about the Digitalmars-d
mailing list