Warp wrote:
> "J�r�me M. Berger" <jeb### [at] free fr> wrote:
>> So here are the timings with no optimization (-O0):
>
> I think comparing speed of unoptimized code is rather absurd and
> useless. :)
>
In a way, that's true. However, it's not as useless as you imply.
For example, in hindsight it is now obvious to me that the compiler
removed the floating point division from Kiss64 (dbl), which
explains why it was as fast as the integer version. So I've attached
a new version of the benchmark that's specifically designed to foil
these kind of optimizations that wouldn't happen in real life. And
here are the timings (with -O3):
Empty loop: 3387ms (was 0ms)
Kiss64 (int): 7348ms (was 6623ms)
Kiss64 (dbl): 16045ms (was 5003ms)
Alvo (floor): 22209ms (was 21539ms)
Alvo (cast): 16258ms (was 14608ms)
Alvo (tmp+cast): 15054ms (was 14664ms)
Isaac: 10701ms (was 10540ms)
Notice how all tests except Isaac now take longer. I believe that
the reason why Isaac isn't affected is because it calls a function
that's in another file, which prevented gcc from optimizing as
aggressively.
This just goes to show that designing benchmarks is not as easy as
it appears...
Jerome
--
mailto:jeb### [at] free fr
http://jeberger.free.fr
Jabber: jeb### [at] jabber fr
Post a reply to this message
Attachments:
Download 'us-ascii' (3 KB)
|