Re: icefox tests issues
Simon Perreault <[email protected]> Wed, 20 Oct 2004 15:47:17 -0400
| Newsgroups | gmane.comp.kde.devel.optimize |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> -- http://nomis80.org