News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Fast random generator

Started by stanhebben, May 27, 2006, 10:05:56 AM

Previous topic - Next topic

stanhebben

Doesn't work for me :(

[edit] even after adjusting the line \masm32\bin\ml615\ml /c /coff "vrandrottest.asm" to fit my installation (I have ml v6.15 in the normal bin folder)[/edit]

[edit] I attached the corrected source [/edit]

[attachment deleted by admin]

w0lfshad3

P4 2.4Ghz

ranrot_sse_benchmark.exe

6FE517A1525B3CCC3558F30B00BDC8B7\
EF48530256A5FDAA8661276F321B2E4D (WBRandomSSE)

5331D40A2D3E8AEB8F58BFFAF79FDE50 (WBRandomSSE2)

0.698630
0.751891 (WDRandom, 2 doubles)

0.263315
0.730211
0.328796
0.317046 (WSRandom, 4 singles)

18 cycles (WBRandom)
3 cycles (WBRandom2)
3 cycles (WDRandom)
14 cycles (WSRandom)

ranrot_benchmark.exe

9F3EA0448C7CEED6 (WBRandom)
F208D9643F3B7CF7 (WBRandom)
FCFC4A8E2E9DB48C (WBRandom)
83506CA443664824 (WBRandom)

46B3DCF5 (WBRandom2)
0740A7B9 (WBRandom2)
C3887A76 (WBRandom2)
966471AC (WBRandom2)

498 (WIRandomC, 0-1000)
528 (WIRandomC, 0-1000)
723 (WIRandomC, 0-1000)
102 (WIRandomC, 0-1000)

325 (WIRandom, 0-1000)
723 (WIRandom, 0-1000)
668 (WIRandom, 0-1000)
446 (WIRandom, 0-1000)

0.963897 (WDRandom, double)
0.518004 (WDRandom, double)
0.908611 (WDRandom, double)
0.581142 (WDRandom, double)

0.721375 (WSRandom, single)
0.524179 (WSRandom, single)
0.881281 (WSRandom, single)
0.014516 (WSRandom, single)

0 cycles (WBRandom)
4294967294 cycles (WBRandom2)
53 cycles (WDRandom)
4294967295 cycles (WSRandom)
21 cycles (WIRandomC)
21 cycles (WIRandom)

ToutEnMasm

Hello,
I have only take a look on the code.
The thing to verify is if two series of numbers generated with the same parameters are the same.
If they are the same , it is not random.
                              ToutEnMasm












stanhebben

If you use the same seed, you'll have the same sequence of numbers. This is a pseudo-random generator.