icefox tests issues
Simon Perreault
nomis80 at nomis80.org
Wed Oct 20 21:47:17 CEST 2004
Juergen Pfennig wrote:
> That's hard to believe. An optimizer should see in most it++ cases that the
> value of it was not used and therefore optimize the expression. The ++it is
> often discussed in text books - but today it's only a question of personal
> taste.
When one of the operator++ functions is not inlined, the compiler has no
way to know which variant (pre or post) is fastest. More importantly,
the two operators could be overloaded to do completely different things.
So the compiler can't optimize this case.
When both operator definitions are inlined or when they are applied to a
base type then the compiler can work its magic.
> Benchmarking is a quite complicated thing. Are you sure that you did not
> benchmark the linux kernel's caching mechanisms?
Raul's results are very unsurprising and should be integrated with much
rejoicing.
--
Simon Perreault <nomis80 at nomis80.org> -- http://nomis80.org
More information about the Kde-optimize
mailing list