Don wrote:
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.
As always -- Agner Fog. www.agner.org. Chapter 1 of his optimisation
manual lists the optimisations performed for Microsoft, Borland, Intel,
GCC, DMC, Watcom, and Codeplay C++ compilers. DMD is basically the same
as DMC, except that it's better at constant propagation.
Don
Thanks for the great link. The "Optimizing software in C++" is a
interesting read. It even mentions "D".
Nick B.