This is the mail archive of the gcc-help@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: loop optimized in 4.7.2, not in 4.8.1?


Oliver --

Sorry for the confusiong:

Oliver Kullmann <O.Kullmann@swansea.ac.uk> writes:

> On Sat, Aug 10, 2013 at 06:06:26PM -0600, Anthony Foiani wrote:
> > They noticed that their earlier compiler (4.6.3 -O3) successfully
> > reduced the loop, while 4.8.1 didn't.

> For general enligthenment, could you quickly explain what "reduce
> the loop" means? One can of course just get rid off the loop,
> precomputing sum, 

That's exactly what I meant.  Apologies for not knowing the correct
phrasing.

> which is, at least for me, an unexpected difference? (I would have
> assumed that, if there is a difference, then Index=UInt should be
> faster.)

Seeing only a 15% difference, you probably want to run it multiple
times and average out the values.

Intuitively, I agree that the unsigned loop variable should be faster,
but I have no idea what's actually going on behind the scenes there.

Best regards,
Anthony Foiani


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