Open idontgetoutmuch opened 8 years ago
It does look suspicious, I will look into it. By the way, I used Ryan Yates' for testing PRNGs as well to show that SplitMix beats other generators. I uploaded the version from GSOC here.
I haven't yet tried SplitMix but here are results for Mersenne Twister, PCG and MWC. I am not surprised at Mersenne Twister being the slowest. I am surprised that MWC is so much faster than PCG. The test takes 10^7 Doubles and adds them.
SFMT
5000675.999132833
886,211,160 bytes allocated in the heap
1,164,321,584 bytes copied during GC
336,503,088 bytes maximum residency (10 sample(s))
12,768,976 bytes maximum slop
546 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max pause
Gen 0 1372 colls, 0 par 0.596s 0.633s 0.0005s 0.0015s
Gen 1 10 colls, 0 par 0.397s 0.561s 0.0561s 0.2850s
INIT time 0.000s ( 0.000s elapsed)
MUT time 0.573s ( 0.563s elapsed)
GC time 0.993s ( 1.194s elapsed)
EXIT time 0.004s ( 0.043s elapsed)
Total time 1.571s ( 1.799s elapsed)
%GC time 63.2% (66.4% elapsed)
Alloc rate 1,545,378,414 bytes per MUT second
Productivity 36.8% of total user, 32.1% of total elapsed
PCG
5000338.525815555
649,506,760 bytes allocated in the heap
1,046,615,240 bytes copied during GC
337,116,104 bytes maximum residency (10 sample(s))
68,076,784 bytes maximum slop
760 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max pause
Gen 0 1232 colls, 0 par 0.582s 0.658s 0.0005s 0.0020s
Gen 1 10 colls, 0 par 0.403s 0.766s 0.0766s 0.5400s
INIT time 0.000s ( 0.000s elapsed)
MUT time 0.254s ( 0.278s elapsed)
GC time 0.984s ( 1.424s elapsed)
EXIT time 0.003s ( 0.069s elapsed)
Total time 1.243s ( 1.772s elapsed)
%GC time 79.2% (80.4% elapsed)
Alloc rate 2,552,460,514 bytes per MUT second
Productivity 20.8% of total user, 14.6% of total elapsed
MWC
5001288.68368923
880,123,088 bytes allocated in the heap
294,568 bytes copied during GC
44,312 bytes maximum residency (2 sample(s))
50,208 bytes maximum slop
1 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max pause
Gen 0 1679 colls, 0 par 0.004s 0.005s 0.0000s 0.0006s
Gen 1 2 colls, 0 par 0.000s 0.000s 0.0002s 0.0003s
INIT time 0.000s ( 0.000s elapsed)
MUT time 0.211s ( 0.217s elapsed)
GC time 0.004s ( 0.005s elapsed)
EXIT time 0.000s ( 0.000s elapsed)
Total time 0.216s ( 0.222s elapsed)
%GC time 1.8% (2.3% elapsed)
Alloc rate 4,171,298,315 bytes per MUT second
Productivity 98.2% of total user, 95.4% of total elapsed
Which one of the PCG from Ryan's test (if any) did you run?
I would have expected
PCG
to be at least twice as fast asMersenne
and all the results seem to be identical for all the different RNGs. This makes me suspicious.