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:26:22 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: Warp
Date: 24 May 2009 03:39:50
Message: <4a18f9c6@news.povray.org>

>         By simple curiosity, I've also added Warp's implementation of Isaac 
> and here is the result (see attached code):

>  > g++ -O3 -lm -o random random.cc IsaacRand.cc

  I suggest adding -march=native in order for gcc to fully optimize it for
your platform. It might make a big difference, especially with this type
of code.
  (Also -lm is probably not needed. At least I don't need it here.)

>  > ./random
> Empty loop:          0ms
> Kiss64 (int):     6623ms
> Kiss64 (dbl):     5003ms
> Alvo (floor):    21539ms
> Alvo (cast):     14608ms
> Alvo (tmp+cast): 14664ms
> Isaac:           10540ms

  I tried running the program on my Pentium4 (with g++ -O3 -march=native)
and got the following results:

Empty loop:          0ms
Kiss64 (int):     2669ms
Kiss64 (dbl):     2643ms
Alvo (floor):     2098ms
Alvo (cast):      1767ms
Alvo (tmp+cast):  1766ms
Isaac:             690ms

  The speed seems to be pretty dependant on the CPU type being used...

  Out of curiosity, I also tried adding -mfpmath=sse to the compiler options,
and the results changed a bit:

Empty loop:          0ms
Kiss64 (int):     2687ms
Kiss64 (dbl):     2640ms
Alvo (floor):     2424ms
Alvo (cast):      1294ms
Alvo (tmp+cast):  1335ms
Isaac:             685ms

-- 
                                                          - Warp


Post a reply to this message

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