This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Guard use of modulo in cshift (speedup protein)


Hi,

On Wed, 11 Apr 2012, Richard Guenther wrote:

> > But it would possibly be an interesting experiment already to do such 
> > transformation generally (without profiling) and see what it gives on 
> > some benchmarks. ÂJust to get a feel what's on the plate.
> 
> The question is, of course, why on earth is a modulo operation in the 
> loop setup so expensive that avoiding it improves the performance of the 
> overall routine so much ...

Because in most cases in protein the loop actually runs only one or two 
times or not at all, hence loop setup is more expensive than the loop 
itself.

> did you expect the code-gen difference of your patch?

Which code-gen difference?  I expected that in the protein case the 
division isn't executed, if that was what your question was about.  If it 
wasn't, please reformulate :)


Ciao,
Michael.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]