This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Optimising std::find on x86 and PPC
Paolo Carlini wrote:
Chris Jefferson wrote:
Then the current loop optimise doesn't do loop unrolling to something
more like:
Besided what Gaby and Benjamin already replied, out of curiosity, what
the loop
unroller is doing, right now?!? Nothing!?!
Yep, with -funroll-loops -O3 on last week's CVS, if I give:
int* check(int* a,int* b)
{
for(;a<b;++a)
if(*a==1) return a;
return a;
}
Then it does no optimising at all. I suspect if it could unroll this by
itself, then it would deal with the processor-specific fixes itself.
Chris