Andi Kleen wrote:
Robert Dewar <[EMAIL PROTECTED]> writes:
a) the standard allows the optimization (or rather does not forbid it)

Assuming it is an optimization. See 
http://gcc.gnu.org/ml/gcc/2007-10/msg00607.html
for a counter example. In general cache misses are so costly that anything
that risks introducing more is in general a bad idea.

Sure, well nearly every optimization has some case where it is a pessimization (one interesting thing that happens is that if you
change the length of generated code in *any* way you may be unlucky
and cause a systematic instruction cache miss in a loop, inlining
can do this some times for example). But indeed, it is important
to evaluate a proposed optimization over a reasonable body of
tests, rather than going into the mode "look, I found this test
that speeds up 32.7% isn't that great? we definitely should put
this optimization in".

Reply via email to