In http://gcc.gnu.org/ml/gcc/2006-05/msg00604.html, you wrote:

The sequence of call, test, jne (or slight variations) occurs in
1000's of places, if a better alternative can be found there could be
significant perofrmance gains.

If the time taken to do the test and branch is really significant compared
to the time taken by the called function, the called function probably has
the grong interface; the loop should be in the callee.
I.e. like using fgetc when you should be using fread.

Now, and interesting compiler project would be to do this re-factoring
automatically in the compiler... standard inlining will do that, but with
a lot of code expansion.  It might be more useful to find loops that are similar
and place them out-of-line as a new function, and have that inline the original
callee.  Maybe something for the next Summer Of Code...


Reply via email to