diff options
Diffstat (limited to 'doc/source/reference/random/performance.rst')
-rw-r--r-- | doc/source/reference/random/performance.rst | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/doc/source/reference/random/performance.rst b/doc/source/reference/random/performance.rst index 3e5c20e3a..9f59a78c7 100644 --- a/doc/source/reference/random/performance.rst +++ b/doc/source/reference/random/performance.rst @@ -29,38 +29,37 @@ The column labeled MT19973 is used the same 32-bit generator as :class:`~generator.Generator`. .. csv-table:: - :header: ,PCG64,MT19937,Philox,RandomState - :widths: 14,14,14,14,14 - - 32-bit Unsigned Ints,3.2,3.3,4.8,3.2 - 64-bit Unsigned Ints,4.8,5.7,6.9,5.7 - Uniforms,5.0,7.3,8.0,7.3 - Normals,11.3,13.0,13.7,34.4 - Exponentials,6.7,7.9,8.6,40.3 - Gammas,30.6,34.2,35.1,58.1 - Binomials,25.7,27.7,28.4,25.9 - Laplaces,41.1,44.5,45.4,46.9 - Poissons,58.1,68.4,70.2,86.0 - + :header: ,MT19937,PCG64,Philox,SFC64,RandomState + :widths: 14,14,14,14,14,14 + + 32-bit Unsigned Ints,4.1,3.3,4.8,2.7,3.2 + 64-bit Unsigned Ints,5.9,5.0,6.4,2.7,5.6 + Uniforms,7.4,5.2,8.1,3.1,7.3 + Normals,13.0,11.4,13.1,7.8,33.9 + Exponentials,8.0,6.6,8.5,4.1,39.8 + Gammas,36.5,31.3,34.8,27.5,57.9 + Binomials,25.6,23.1,26.0,19.8,25.0 + Laplaces,45.8,41.9,45.4,38.0,45.5 + Poissons,67.9,57.7,68.3,58.7,80.8 The next table presents the performance in percentage relative to values generated by the legagy generator, `RandomState(MT19937())`. The overall performance was computed using a geometric mean. .. csv-table:: - :header: ,PCG64,MT19937,Philox - :widths: 14,14,14,14 - - 32-bit Unsigned Ints,100,99,67 - 64-bit Unsigned Ints,118,100,83 - Uniforms,147,100,91 - Normals,304,264,252 - Exponentials,601,512,467 - Gammas,190,170,166 - Binomials,101,93,91 - Laplaces,114,105,103 - Poissons,148,126,123 - Overall,167,145,131 + :header: ,MT19937,PCG64,Philox,SFC64 + :widths: 14,14,14,14,14 + + 32-bit Unsigned Ints,77,96,66,116 + 64-bit Unsigned Ints,95,112,86,206 + Uniforms,99,140,90,235 + Normals,260,296,258,437 + Exponentials,497,600,467,974 + Gammas,159,185,166,211 + Binomials,98,108,96,126 + Laplaces,99,109,100,120 + Poissons,119,140,118,138 + Overall,137,163,131,217 .. note:: @@ -81,33 +80,34 @@ across tables. 64-bit Linux ~~~~~~~~~~~~ -=================== ========= ======= ======== -Distribution MT19937 PCG64 Philox -=================== ========= ======= ======== -32-bit Unsigned Int 100 113.9 72.1 -64-bit Unsigned Int 100 143.3 89.7 -Uniform 100 181.5 90.8 -Exponential 100 145.5 92.5 -Normal 100 121.4 98.3 -**Overall** 100 139.3 88.2 -=================== ========= ======= ======== +=================== ========= ======= ======== ======= +Distribution MT19937 PCG64 Philox SFC64 +=================== ========= ======= ======== ======= +32-bit Unsigned Int 100 98.0 67.7 120.2 +64-bit Unsigned Int 100 120.4 90.8 213.3 +Uniforms 100 141.0 87.0 232.0 +Normals 100 115.7 99.2 167.8 +Exponentials 100 116.8 93.0 189.3 +**Overall** 100 117.6 86.8 180.0 +=================== ========= ======= ======== ======= 64-bit Windows ~~~~~~~~~~~~~~ -The performance on 64-bit Linux and 64-bit Windows is broadly similar. +The relative performance on 64-bit Linux and 64-bit Windows is broadly similar. + +=================== ========= ======= ======== ======= +Distribution MT19937 PCG64 Philox SFC64 +=================== ========= ======= ======== ======= +32-bit Unsigned Int 100 129.1 35.0 135.0 +64-bit Unsigned Int 100 146.9 35.7 176.5 +Uniforms 100 165.0 37.0 192.0 +Normals 100 128.5 48.5 158.0 +Exponentials 100 151.6 39.0 172.8 +**Overall** 100 143.6 38.7 165.7 +=================== ========= ======= ======== ======= -=================== ========= ======= ======== -Distribution MT19937 PCG64 Philox -=================== ========= ======= ======== -32-bit Unsigned Int 100 134.9 44.1 -64-bit Unsigned Int 100 162.7 41.0 -Uniform 100 200.0 44.8 -Exponential 100 167.8 47.4 -Normal 100 135.6 60.3 -**Overall** 100 158.4 47.1 -=================== ========= ======= ======== 32-bit Windows ~~~~~~~~~~~~~~ @@ -116,16 +116,16 @@ The performance of 64-bit generators on 32-bit Windows is much lower than on 64- operating systems due to register width. MT19937, the generator that has been in NumPy since 2005, operates on 32-bit integers. -=================== ========= ======= ======== -Distribution MT19937 PCG64 Philox -=================== ========= ======= ======== -32-bit Unsigned Int 100 30.6 28.1 -64-bit Unsigned Int 100 24.2 23.7 -Uniform 100 26.7 28.4 -Exponential 100 32.1 32.6 -Normal 100 36.3 37.5 -**Overall** 100 29.7 29.7 -=================== ========= ======= ======== +=================== ========= ======= ======== ======= +Distribution MT19937 PCG64 Philox SFC64 +=================== ========= ======= ======== ======= +32-bit Unsigned Int 100 30.5 21.1 77.9 +64-bit Unsigned Int 100 26.3 19.2 97.0 +Uniforms 100 28.0 23.0 106.0 +Normals 100 40.1 31.3 112.6 +Exponentials 100 33.7 26.3 109.8 +**Overall** 100 31.4 23.8 99.8 +=================== ========= ======= ======== ======= .. note:: |