> > g++ -O3 -lm -o random random.cc IsaacRand.cc
>
> > ./random
> Empty loop: 0ms
> Kiss64 (int): 6623ms
> Kiss64 (dbl): 5003ms
> Alvo (floor): 21539ms
> Alvo (cast): 14608ms
> Alvo (tmp+cast): 14664ms
> Isaac: 10540ms
>
Upon reflection, those timing are ridiculous because there is no
way to know what was optimized away by the compiler (like the empty
loop: no matter how high I set LOOPS, that takes 0ms which is
absurd). So here are the timings with no optimization (-O0):
Empty loop: 6324ms
Kiss64 (int): 13482ms
Kiss64 (dbl): 33679ms
Alvo (floor): 26223ms
Alvo (cast): 20113ms
Alvo (tmp+cast): 23512ms
Isaac: 33855ms
Of course, this doesn't say anything about the quality of the
random numbers generated.
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' (1 KB)
|