@@ -29,38 +29,38 @@ The column labeled MT19973 is used the same 32-bit generator as
29
29
:class: `~generator.Generator `.
30
30
31
31
.. csv-table ::
32
- :header: ,Xoshiro256**,Xoshiro512**,DSFMT, PCG64,MT19937,Philox,RandomState,ThreeFry
33
- :widths: 14,14,14,14,14,14,14,14,14
32
+ :header: ,PCG64,MT19937,Philox,RandomState
33
+ :widths: 14,14,14,14,14
34
34
35
- 32-bit Unsigned Ints,2.6,2.9,3.5,3. 2,3.3,4.8,3.2,7.6
36
- 64-bit Unsigned Ints,3.3,4.3,5.7,4. 8,5.7,6.9,5.7,12.8
37
- Uniforms,3.4,4.0,3.2, 5.0,7.3,8.0,7.3,12.8
38
- Normals,7.9,9.0, 11.8,11. 3,13.0,13.7,34.4,18.1
39
- Exponentials,4.7,5.2,7.4, 6.7,7.9,8.6,40.3,14.7
40
- Gammas,29.1,27.5,28.5, 30.6,34.2,35.1,58.1,47.6
41
- Binomials,22.7,23.1,21.1, 25.7,27.7,28.4,25.9,32.1
42
- Laplaces,38.5,38.1,36.9, 41.1,44.5,45.4,46.9,50.2
43
- Poissons,46.9,50.9,46.4, 58.1,68.4,70.2,86.0,88.2
35
+ 32-bit Unsigned Ints,3. 2,3.3,4.8,3.2
36
+ 64-bit Unsigned Ints,4. 8,5.7,6.9,5.7
37
+ Uniforms,5.0,7.3,8.0,7.3
38
+ Normals,11.3,13.0,13.7,34.4
39
+ Exponentials,6.7,7.9,8.6,40.3
40
+ Gammas,30.6,34.2,35.1,58.1
41
+ Binomials,25.7,27.7,28.4,25.9
42
+ Laplaces,41.1,44.5,45.4,46.9
43
+ Poissons,58.1,68.4,70.2,86.0
44
44
45
45
46
46
The next table presents the performance in percentage relative to values
47
47
generated by the legagy generator, `RandomState(MT19937()) `. The overall
48
48
performance was computed using a geometric mean.
49
49
50
50
.. csv-table ::
51
- :header: ,Xoshiro256**,Xoshiro256**,DSFMT, PCG64,MT19937,Philox,ThreeFry
52
- :widths: 14,14,14,14,14,14,14,14
53
-
54
- 32-bit Unsigned Ints,124,113,93, 100,99,67,43
55
- 64-bit Unsigned Ints,174,133,100, 118,100,83,44
56
- Uniforms,212,181,229, 147,100,91,57
57
- Normals,438,382,291, 304,264,252,190
58
- Exponentials,851,770,547, 601,512,467,275
59
- Gammas,200,212,204, 190,170,166,122
60
- Binomials,114,112,123, 101,93,91,81
61
- Laplaces,122,123,127, 114,105,103,93
62
- Poissons,183,169,185, 148,126,123,98
63
- Overall,212,194,180, 167,145,131,93
51
+ :header: ,PCG64,MT19937,Philox
52
+ :widths: 14,14,14,14
53
+
54
+ 32-bit Unsigned Ints,100,99,67
55
+ 64-bit Unsigned Ints,118,100,83
56
+ Uniforms,147,100,91
57
+ Normals,304,264,252
58
+ Exponentials,601,512,467
59
+ Gammas,190,170,166
60
+ Binomials,101,93,91
61
+ Laplaces,114,105,103
62
+ Poissons,148,126,123
63
+ Overall,167,145,131
64
64
65
65
.. note ::
66
66
@@ -81,33 +81,33 @@ across tables.
81
81
64-bit Linux
82
82
~~~~~~~~~~~~
83
83
84
- =================== ======= ========= ======= ======== ========== ==== ========
85
- Distribution DSFMT MT19937 PCG64 Philox ThreeFry Xoshiro256
86
- =================== ======= ========= ======= ======== ========== ==== ========
87
- 32-bit Unsigned Int 99.3 100 113.9 72.1 48.3 117 .1
88
- 64-bit Unsigned Int 105.7 100 143.3 89.7 48.1 161 .7
89
- Uniform 222.1 100 181.5 90.8 59.9 204.7
90
- Exponential 110.8 100 145.5 92.5 55.0 177.1
91
- Normal 113.2 100 121.4 98.3 71.9 162.0
92
- **Overall ** 123.9 100 139.3 88.2 56.0 161.9
93
- =================== ======= ========= ======= ======== ========== ==== ========
84
+ =================== ========= ======= ========
85
+ Distribution MT19937 PCG64 Philox
86
+ =================== ========= ======= ========
87
+ 32-bit Unsigned Int 100 113.9 72.1
88
+ 64-bit Unsigned Int 100 143.3 89.7
89
+ Uniform 100 181.5 90.8
90
+ Exponential 100 145.5 92.5
91
+ Normal 100 121.4 98.3
92
+ **Overall ** 100 139.3 88.2
93
+ =================== ========= ======= ========
94
94
95
95
96
96
64-bit Windows
97
97
~~~~~~~~~~~~~~
98
98
The performance on 64-bit Linux and 64-bit Windows is broadly similar.
99
99
100
100
101
- =================== ======= ========= ======= ======== ========== ==== ========
102
- Distribution DSFMT MT19937 PCG64 Philox ThreeFry Xoshiro256
103
- =================== ======= ========= ======= ======== ========== ==== ========
104
- 32-bit Unsigned Int 122.8 100 134.9 44.1 72.3 133 .1
105
- 64-bit Unsigned Int 130.4 100 162.7 41.0 77.7 142.3
106
- Uniform 273.2 100 200.0 44.8 84.6 175 .8
107
- Exponential 135.0 100 167.8 47.4 84.5 166.9
108
- Normal 115.3 100 135.6 60.3 93.6 169.6
109
- **Overall ** 146.7 100 158.4 47.1 82.2 156.5
110
- =================== ======= ========= ======= ======== ========== ==== ========
101
+ =================== ========= ======= ========
102
+ Distribution MT19937 PCG64 Philox
103
+ =================== ========= ======= ========
104
+ 32-bit Unsigned Int 100 134.9 44.1
105
+ 64-bit Unsigned Int 100 162.7 41.0
106
+ Uniform 100 200.0 44.8
107
+ Exponential 100 167.8 47.4
108
+ Normal 100 135.6 60.3
109
+ **Overall ** 100 158.4 47.1
110
+ =================== ========= ======= ========
111
111
112
112
32-bit Windows
113
113
~~~~~~~~~~~~~~
@@ -116,20 +116,20 @@ The performance of 64-bit generators on 32-bit Windows is much lower than on 64-
116
116
operating systems due to register width. MT19937, the generator that has been
117
117
in NumPy since 2005, operates on 32-bit integers.
118
118
119
- =================== ======= ========= ======= ======== ========== ==== ========
120
- Distribution DSFMT MT19937 PCG64 Philox ThreeFry Xoshiro256
121
- =================== ======= ========= ======= ======== ========== ==== ========
122
- 32-bit Unsigned Int 110.9 100 30.6 28.1 29.2 74.4
123
- 64-bit Unsigned Int 104.7 100 24.2 23.7 22.7 72 .7
124
- Uniform 247.0 100 26.7 28.4 27.8 78.8
125
- Exponential 110.1 100 32.1 32.6 30.5 89 .6
126
- Normal 107.2 100 36.3 37.5 35.2 93.0
127
- **Overall ** 127.6 100 29.7 29.7 28.8 81.3
128
- =================== ======= ========= ======= ======== ========== ==== ========
119
+ =================== ========= ======= ========
120
+ Distribution MT19937 PCG64 Philox
121
+ =================== ========= ======= ========
122
+ 32-bit Unsigned Int 100 30.6 28.1
123
+ 64-bit Unsigned Int 100 24.2 23.7
124
+ Uniform 100 26.7 28.4
125
+ Exponential 100 32.1 32.6
126
+ Normal 100 36.3 37.5
127
+ **Overall ** 100 29.7 29.7
128
+ =================== ========= ======= ========
129
129
130
130
131
131
.. note ::
132
132
133
- Linux timings used Ubuntu 18.04 and GCC 7.4. Windows timings were made on Windows 10
134
- using Microsoft C/C++ Optimizing Compiler Version 19 (Visual Studio 2015). All timings
135
- were produced on a i5-3570 processor.
133
+ Linux timings used Ubuntu 18.04 and GCC 7.4. Windows timings were made on
134
+ Windows 10 using Microsoft C/C++ Optimizing Compiler Version 19 (Visual
135
+ Studio 2015). All timings were produced on a i5-3570 processor.
0 commit comments