making 128bit randomgenerator(s)
I decided to try alternative fast gp reg unrolled 4 times
using mul instead of pmuludq,is there any way to use edx result for randomize it more?
I have 128bit SSE2 simple randomgenerator in macro
unrolled it 8 times in loop few million times
and checks for primes and add together primes
could you check timings please?
$ wine cmd.exe
Microsoft Windows 6.1.7601
Z:\home\mineiro\Documentos>1th.exe
1# program
the RND's
sum of random primes :583603954
27
Ms : 315
Ms composites :0
Press any key to continue ...
Z:\home\mineiro\Documentos>1th.exe
1# program
the RND's
sum of random primes :583603954
27
Ms : 318
Ms composites :0
Press any key to continue ..
Z:\home\mineiro\Documentos>1th.exe
1# program
the RND's
sum of random primes :583603954
27
Ms : 338
Ms composites :0
Press any key to continue ..
Well...not so random:1# program
the RND's
sum of random primes :583603954
27
Ms : 468
Ms composites :0
Press any key to continue ...
1# program
the RND's
sum of random primes :583603954
27
Ms : 391
Ms composites :0
Press any key to continue ...
I can also use random seed,but for timings it will become random add together or not,could randomize timings some without same seeds
with before also generating primes,it took several seconds
probably can go faster
1# program
the RND's
sum of random primes :583610108
27
Ms : 577
Ms composites :-2029479
Press any key to continue ...
Ms : 592
Ms composites :-2081178
Ms : 562
Ms composites :-2116059
Ms : 561
Ms composites :-2141363
Ms : 577
Ms composites :-2176416
its really fast now :biggrin:
1# program
the RND's
sum of random primes :583610108
27
Ms : 156
Ms composites :-1527477187
Press any key to continue ...
but maybe slower on older cpus
changed align 64 above loops and removed two .IFs
started with over 2000+ms,when it took most time pre-generate primes
Hi daydreamer,
1# program
the RND's
sum of random primes :583610108
27
Ms : 125
Ms composites :-71800812
Press any key to continue ...
1# program
the RND's
sum of random primes :583610108
27
Ms : 125
Ms composites :-71843093
Press any key to continue ...
1# program
the RND's
sum of random primes :583610108
27
Ms : 140
Ms composites :-71870625
Press any key to continue ...
my timing results are always in two variations 140 - 125, is this normal? What algorithm was taken as a basis? Is it possible to check the randomness of the distribution of numbers?
LiaoMi
The First posted earlier was inspired by Hutch 64bit random pad ,somewhere he had some program that you could test random quality
I had both rdtsc and get milliseconds to randomizer it
Its the usual windows milliseconds clock from startup I use
The later Unrolled 128bit generator Is based on fast simple rnd generator for texture generating
The app you are looking for is called ENT written by John Walker. Its freeware.
Quote from: hutch-- on June 12, 2021, 05:58:10 PM
The app you are looking for is called ENT written by John Walker. Its freeware.
Thanks hutch :thumbsup:
Is there a way to combine several different rnd generators for quality, instead of quantity?
wish to add one test to rnd generators: randomness/speed ratio
Seem solution to better randomness is right there,looking at low compression ratio for. Primes.inc