New Lagged Fib. PRNG gen and random2.d
monarch_dodra
monarchdodra at gmail.com
Mon Aug 26 02:35:01 PDT 2013
On Monday, 26 August 2013 at 09:24:57 UTC, monarch_dodra wrote:
> That's my biased review/comment on the numbers. I'll post them
> here, so you can interpret yourself.
Units are ms. 1_000_000_000 iterations
/*Generate simple uints*/
Time for LinearCongruentialEngine!(uint, 16807, 0, 2147483647):
7487
Time for LinearCongruentialEngine!(uint, 48271, 0, 2147483647):
7092
Time for MersenneTwisterEngine!(uint, 32, 624, 397, 31,
2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18): 13678
Time for XorshiftEngine!(uint, 32, 13, 17, 5) : 4266
Time for XorshiftEngine!(uint, 64, 10, 13, 10) : 4694
Time for XorshiftEngine!(uint, 96, 10, 5, 26) : 5697
Time for XorshiftEngine!(uint, 128, 11, 8, 19) : 5675
Time for XorshiftEngine!(uint, 160, 2, 1, 4) : 6401
Time for XorshiftEngine!(uint, 192, 2, 1, 4) : 6754
Time for LaggedFibonacciEngine!(uint, 32u, 607, 273) : 7630
Time for LaggedFibonacciEngine!(uint, 32u, 1279, 418) : 7196
Time for LaggedFibonacciEngine!(uint, 32u, 2281, 1252) : 7411
Time for LaggedFibonacciEngine!(uint, 32u, 3217, 576) : 7031
Time for LaggedFibonacciEngine!(uint, 32u, 4423, 2098) : 7402
Time for LaggedFibonacciEngine!(uint, 32u, 9689, 5502) : 6999
Time for LaggedFibonacciEngine!(uint, 32u, 19937, 9842) : 7478
Time for LaggedFibonacciEngine!(uint, 32u, 23209, 13470) : 7064
Time for LaggedFibonacciEngine!(uint, 32u, 44497, 21034) : 7528
/*Note: These generate longer ulong types*/
Time for LaggedFibonacciEngine!(ulong, 48u, 607, 273) : 11860
Time for LaggedFibonacciEngine!(ulong, 48u, 1279, 418) : 11675
Time for LaggedFibonacciEngine!(ulong, 48u, 2281, 1252) : 11622
Time for LaggedFibonacciEngine!(ulong, 48u, 3217, 576) : 11621
Time for LaggedFibonacciEngine!(ulong, 48u, 4423, 2098) : 11699
Time for LaggedFibonacciEngine!(ulong, 48u, 9689, 5502) : 11898
Time for LaggedFibonacciEngine!(ulong, 48u, 19937, 9842) : 11883
Time for LaggedFibonacciEngine!(ulong, 48u, 23209, 13470) : 11870
Time for LaggedFibonacciEngine!(ulong, 48u, 44497, 21034) : 11908
Time for LaggedFibonacciEngine!(ulong, 64u, 607, 273) : 11745
Time for LaggedFibonacciEngine!(ulong, 64u, 1279, 418) : 11838
Time for LaggedFibonacciEngine!(ulong, 64u, 2281, 1252) : 11656
Time for LaggedFibonacciEngine!(ulong, 64u, 3217, 576) : 11709
Time for LaggedFibonacciEngine!(ulong, 64u, 4423, 2098) : 11768
Time for LaggedFibonacciEngine!(ulong, 64u, 9689, 5502) : 11863
Time for LaggedFibonacciEngine!(ulong, 64u, 19937, 9842) : 11923
Time for LaggedFibonacciEngine!(ulong, 64u, 23209, 13470) : 11878
Time for LaggedFibonacciEngine!(ulong, 64u, 44497, 21034) : 11905
/* Generating doubles */
/* via g.front/g.max */
Time for LinearCongruentialEngine!(uint, 16807, 0, 2147483647):
12093
Time for LinearCongruentialEngine!(uint, 48271, 0, 2147483647):
12057
Time for MersenneTwisterEngine!(uint, 32, 624, 397, 31,
2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18): 19510
Time for XorshiftEngine!(uint, 32, 13, 17, 5) : 10616
Time for XorshiftEngine!(uint, 64, 10, 13, 10) : 10634
Time for XorshiftEngine!(uint, 96, 10, 5, 26) : 10978
Time for XorshiftEngine!(uint, 128, 11, 8, 19) : 11715
Time for XorshiftEngine!(uint, 160, 2, 1, 4) : 12052
Time for XorshiftEngine!(uint, 192, 2, 1, 4) : 12017
Time for LaggedFibonacciEngine!(uint, 32u, 607, 273) : 12449
Time for LaggedFibonacciEngine!(uint, 32u, 1279, 418) : 12382
Time for LaggedFibonacciEngine!(uint, 32u, 2281, 1252) : 12334
Time for LaggedFibonacciEngine!(uint, 32u, 3217, 576) : 12321
Time for LaggedFibonacciEngine!(uint, 32u, 4423, 2098) : 12293
Time for LaggedFibonacciEngine!(uint, 32u, 9689, 5502) : 12482
Time for LaggedFibonacciEngine!(uint, 32u, 19937, 9842) : 12596
Time for LaggedFibonacciEngine!(uint, 32u, 23209, 13470) : 12605
Time for LaggedFibonacciEngine!(uint, 32u, 44497, 21034) : 12727
Time for LaggedFibonacciEngine!(ulong, 48u, 607, 273) : 17727
Time for LaggedFibonacciEngine!(ulong, 48u, 1279, 418) : 17626
Time for LaggedFibonacciEngine!(ulong, 48u, 2281, 1252) : 17527
Time for LaggedFibonacciEngine!(ulong, 48u, 3217, 576) : 17549
Time for LaggedFibonacciEngine!(ulong, 48u, 4423, 2098) : 19146
Time for LaggedFibonacciEngine!(ulong, 48u, 9689, 5502) : 18044
Time for LaggedFibonacciEngine!(ulong, 48u, 19937, 9842) : 17612
Time for LaggedFibonacciEngine!(ulong, 48u, 23209, 13470) : 17810
Time for LaggedFibonacciEngine!(ulong, 48u, 44497, 21034) : 17855
Time for LaggedFibonacciEngine!(ulong, 64u, 607, 273) : 17736
Time for LaggedFibonacciEngine!(ulong, 64u, 1279, 418) : 17630
Time for LaggedFibonacciEngine!(ulong, 64u, 2281, 1252) : 18671
Time for LaggedFibonacciEngine!(ulong, 64u, 3217, 576) : 17775
Time for LaggedFibonacciEngine!(ulong, 64u, 4423, 2098) : 17773
Time for LaggedFibonacciEngine!(ulong, 64u, 9689, 5502) : 17905
Time for LaggedFibonacciEngine!(ulong, 64u, 19937, 9842) : 17887
Time for LaggedFibonacciEngine!(ulong, 64u, 23209, 13470) : 17910
Time for LaggedFibonacciEngine!(ulong, 64u, 44497, 21034) : 17976
/* Using native doubles */
Time for LaggedFibonacciEngine!(double, 32u, 607, 273) : 14741
Time for LaggedFibonacciEngine!(double, 32u, 1279, 418) : 14475
Time for LaggedFibonacciEngine!(double, 32u, 2281, 1252) : 14829
Time for LaggedFibonacciEngine!(double, 32u, 3217, 576) : 14815
Time for LaggedFibonacciEngine!(double, 32u, 4423, 2098) : 14817
Time for LaggedFibonacciEngine!(double, 32u, 9689, 5502) : 14698
Time for LaggedFibonacciEngine!(double, 32u, 19937, 9842) : 14882
Time for LaggedFibonacciEngine!(double, 32u, 23209, 13470): 14819
Time for LaggedFibonacciEngine!(double, 32u, 44497, 21034): 14924
/* Native doubles, but higher precision */
Time for LaggedFibonacciEngine!(double, 48u, 607, 273) : 14657
Time for LaggedFibonacciEngine!(double, 48u, 1279, 418) : 14577
Time for LaggedFibonacciEngine!(double, 48u, 2281, 1252) : 14652
Time for LaggedFibonacciEngine!(double, 48u, 3217, 576) : 14464
Time for LaggedFibonacciEngine!(double, 48u, 4423, 2098) : 14619
Time for LaggedFibonacciEngine!(double, 48u, 9689, 5502) : 15168
Time for LaggedFibonacciEngine!(double, 48u, 19937, 9842) : 14904
Time for LaggedFibonacciEngine!(double, 48u, 23209, 13470): 15016
Time for LaggedFibonacciEngine!(double, 48u, 44497, 21034): 15083
Time for LaggedFibonacciEngine!(double, 64u, 607, 273) : 14807
Time for LaggedFibonacciEngine!(double, 64u, 1279, 418) : 14639
Time for LaggedFibonacciEngine!(double, 64u, 2281, 1252) : 14582
Time for LaggedFibonacciEngine!(double, 64u, 3217, 576) : 14587
Time for LaggedFibonacciEngine!(double, 64u, 4423, 2098) : 14794
Time for LaggedFibonacciEngine!(double, 64u, 9689, 5502) : 14893
Time for LaggedFibonacciEngine!(double, 64u, 19937, 9842) : 14802
Time for LaggedFibonacciEngine!(double, 64u, 23209, 13470): 15077
Time for LaggedFibonacciEngine!(double, 64u, 44497, 21034): 15115
Time for LaggedFibonacciEngine!(real, 64u, 607, 273) : 19308
Time for LaggedFibonacciEngine!(real, 64u, 1279, 418) : 19249
Time for LaggedFibonacciEngine!(real, 64u, 2281, 1252) : 19176
Time for LaggedFibonacciEngine!(real, 64u, 3217, 576) : 19128
Time for LaggedFibonacciEngine!(real, 64u, 4423, 2098) : 19878
Time for LaggedFibonacciEngine!(real, 64u, 9689, 5502) : 19221
Time for LaggedFibonacciEngine!(real, 64u, 19937, 9842) : 19211
Time for LaggedFibonacciEngine!(real, 64u, 23209, 13470) : 19241
Time for LaggedFibonacciEngine!(real, 64u, 44497, 21034) : 19268
More information about the Digitalmars-d
mailing list