POV-Ray : Newsgroups : povray.general : Requesting ideas/opinions for RNG seeding syntax : Re: Requesting ideas/opinions for RNG seeding syntax Server Time
30 Jul 2024 22:14:36 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: "Jérôme M. Berger"
Date: 24 May 2009 05:01:38
Message: <4a190cf2$1@news.povray.org>
Warp wrote:
> "J�r�me M. Berger" <jeb### [at] freefr> 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] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr


Post a reply to this message


Attachments:
Download 'us-ascii' (3 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.