@@ -29,38 +29,37 @@ 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: ,PCG64,MT19937,Philox,RandomState
33
- :widths: 14,14,14,14,14
34
-
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
-
32
+ :header: ,MT19937,PCG64,Philox,SFC64,RandomState
33
+ :widths: 14,14,14,14,14,14
34
+
35
+ 32-bit Unsigned Ints,4.1,3.3,4.8,2.7,3.2
36
+ 64-bit Unsigned Ints,5.9,5.0,6.4,2.7,5.6
37
+ Uniforms,7.4,5.2,8.1,3.1,7.3
38
+ Normals,13.0,11.4,13.1,7.8,33.9
39
+ Exponentials,8.0,6.6,8.5,4.1,39.8
40
+ Gammas,36.5,31.3,34.8,27.5,57.9
41
+ Binomials,25.6,23.1,26.0,19.8,25.0
42
+ Laplaces,45.8,41.9,45.4,38.0,45.5
43
+ Poissons,67.9,57.7,68.3,58.7,80.8
45
44
46
45
The next table presents the performance in percentage relative to values
47
46
generated by the legagy generator, `RandomState(MT19937()) `. The overall
48
47
performance was computed using a geometric mean.
49
48
50
49
.. csv-table ::
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
50
+ :header: ,MT19937,PCG64, Philox,SFC64
51
+ :widths: 14,14,14,14,14
52
+
53
+ 32-bit Unsigned Ints,77,96,66,116
54
+ 64-bit Unsigned Ints,95,112,86,206
55
+ Uniforms,99,140,90,235
56
+ Normals,260,296,258,437
57
+ Exponentials,497,600 ,467,974
58
+ Gammas,159,185 ,166,211
59
+ Binomials,98,108,96,126
60
+ Laplaces,99,109,100,120
61
+ Poissons,119,140,118,138
62
+ Overall,137,163 ,131,217
64
63
65
64
.. note ::
66
65
@@ -81,33 +80,34 @@ across tables.
81
80
64-bit Linux
82
81
~~~~~~~~~~~~
83
82
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
- =================== ========= ======= ========
83
+ =================== ========= ======= ======== =======
84
+ Distribution MT19937 PCG64 Philox SFC64
85
+ =================== ========= ======= ======== =======
86
+ 32-bit Unsigned Int 100 98.0 67.7 120.2
87
+ 64-bit Unsigned Int 100 120.4 90.8 213.3
88
+ Uniforms 100 141.0 87.0 232.0
89
+ Normals 100 115.7 99.2 167.8
90
+ Exponentials 100 116.8 93.0 189 .3
91
+ **Overall ** 100 117.6 86.8 180.0
92
+ =================== ========= ======= ======== =======
94
93
95
94
96
95
64-bit Windows
97
96
~~~~~~~~~~~~~~
98
- The performance on 64-bit Linux and 64-bit Windows is broadly similar.
97
+ The relative performance on 64-bit Linux and 64-bit Windows is broadly similar.
98
+
99
99
100
+ =================== ========= ======= ======== =======
101
+ Distribution MT19937 PCG64 Philox SFC64
102
+ =================== ========= ======= ======== =======
103
+ 32-bit Unsigned Int 100 129.1 35.0 135.0
104
+ 64-bit Unsigned Int 100 146.9 35.7 176.5
105
+ Uniforms 100 165.0 37.0 192.0
106
+ Normals 100 128.5 48.5 158.0
107
+ Exponentials 100 151.6 39.0 172.8
108
+ **Overall ** 100 143.6 38.7 165.7
109
+ =================== ========= ======= ======== =======
100
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,16 +116,16 @@ 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 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
- =================== ========= ======= ========
119
+ =================== ========= ======= ======== =======
120
+ Distribution MT19937 PCG64 Philox SFC64
121
+ =================== ========= ======= ======== =======
122
+ 32-bit Unsigned Int 100 30.5 21.1 77.9
123
+ 64-bit Unsigned Int 100 26.3 19.2 97.0
124
+ Uniforms 100 28.0 23.0 106.0
125
+ Normals 100 40 .1 31.3 112 .6
126
+ Exponentials 100 33.7 26 .3 109.8
127
+ **Overall ** 100 31.4 23.8 99.8
128
+ =================== ========= ======= ======== =======
129
129
130
130
131
131
.. note ::
0 commit comments