The speed of the compiler, was: Re: Combine four insns

Andi Kleen andi@firstfloor.org
Tue Aug 10 15:32:00 GMT 2010


> I'm sure there is a way to open-code this using integer math.

I don't think so. Take a look at what PCMPESTRI does.  There's no easy 
replacement, even if you use all the Hacker's Delight tricks 
(it's really a cool instruction, but also very complicated :-)

> Likely the performance issue is both that we use byte loads
> and 4 comparisons per char.  Maybe 4 parallel strchr optimized
> searches are comparable fast?

and various other overhead.

-Andi



More information about the Gcc-patches mailing list