Skip to content

Commit f09ca47

Browse files
committed
#24-Create one single documentation for algos performances
Finally inserted in `README.md`.
1 parent f734183 commit f09ca47

1 file changed

Lines changed: 35 additions & 6 deletions

File tree

README.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,58 @@ In [1], every known PRNG at the time of the editing has been tested according to
6262
* **_crush_** is a bigger set of tests that test more deeply expected random characteristics;
6363
* **_big crush_** is the ultimate set of difficult tests that any **good** PRNG should definitively pass.
6464

65-
We give you here below a copy of the resulting table for the PRGs that havebeen implemented in **PyRandLib** plus the Mersenne twister one which is not implemented in **PyRandLib**, as provided in [1].
65+
We give you here below a copy of the resulting table for the PRGs that have been implemented in **PyRandLib**, as provided in [1], plus the Mersenne twister one which is not implemented in **PyRandLib**.
6666

6767
| PyRabndLib class | TU01 generator name | Memory Usage | Period | time-32bits | time-64 bits | SmallCrush fails | Crush fails | BigCrush fails |
6868
| ---------------- | ---------------------------------- | --------------- | ------- | ----------- | ------------ | ---------------- | ----------- | -------------- |
6969
| FastRand32 | LCG(2^32, 69069, 1) | 1 x 4-bytes | 2^32 | 3.20 | 0.67 | 11 | 106 | *too many* |
7070
| FastRand63 | LCG(2^63, 9219741426499971445, 1) | 2 x 4-bytes | 2^63 | 4.20 | 0.75 | 0 | 5 | 7 |
71-
| MRGRand287 | Marsa-LFIB4 | 256 x 4-bytes | 2^287 | 3.40 | 0.8 | 0 | 0 | 0 |
72-
| MRGRand1457 | DX-47-3 | 47 x 4-bytes | 2^1457 | n.a. | 1.4 | 0 | 0 | 0 |
73-
| MRGRand49507 | DX-1597-2-7 | 1,597 x 4-bytes | 2^49507 | n.a. | 1.4 | 0 | 0 | 0 |
7471
| LFib78 | LFib(2^64, 17, 5, +) | 34 x 4-bytes | 2^78 | n.a. | 1.1 | 0 | 0 | 0 |
7572
| LFib116 | LFib(2^64, 55, 24, +) | 110 x 4-bytes | 2^116 | n.a. | 1.0 | 0 | 0 | 0 |
7673
| LFib668 | LFib(2^64, 607, 273, +) | 1,214 x 4-bytes | 2^668 | n.a. | 0.9 | 0 | 0 | 0 |
7774
| LFib1340 | LFib(2^64, 1279, 861, +) | 2,558 x 4-bytes | 2^1340 | n.a. | 0.9 | 0 | 0 | 0 |
75+
| MRGRand287 | Marsa-LFIB4 | 256 x 4-bytes | 2^287 | 3.40 | 0.8 | 0 | 0 | 0 |
76+
| MRGRand1457 | DX-47-3 | 47 x 4-bytes | 2^1457 | n.a. | 1.4 | 0 | 0 | 0 |
77+
| MRGRand49507 | DX-1597-2-7 | 1,597 x 4-bytes | 2^49507 | n.a. | 1.4 | 0 | 0 | 0 |
7878
| Well512a | not available | 16 x 4-bytes | 2^512 | n.a. | n.a. | n.a. | n.a. | n.a. |
7979
| Well1024a | WELL1024a | 32 x 4-bytes | 2^1024 | 4.0 | 1.1 | 0 | 4 | 4 |
8080
| Well19937b (1) | WELL19937a | 624 x 4-bytes | 2^19937 | 4.3 | 1.3 | 0 | 2 | 2 |
8181
| Well44497c | not available | 1,391 x 4-bytes | 2^44497 | n.a. | n.a. | n.a. | n.a. | n.a. |
8282
| Mersenne twister | MT19937 | 6 x 4-bytes | 2^19937 | 4.30 | 1.6 | 0 | 2 | 2 |
8383

84-
(1)The Well19937b generator provided with library PyRandLib implements the
85-
Well19937a algorithm augmented with an associated tempering algorithm.
84+
(1)The Well19937b generator provided with library PyRandLib implements the Well19937a algorithm augmented with an associated *tempering* algorithm.
85+
8686

8787

88+
## CPU Performances - Times evaluation
89+
90+
The above table provided times related to the C implementation of the specified PRNGs as measured with TestU01 [1] by the authors of the paper.
91+
We provide in the table below the evaluation of times spent in calling the `__call__()` method for all PRNGs implemented in library **PyRandLib**. Then, the measured elapsed time includes the calling and returning Python mechanisms and not only the computation time of the sole algorithm code. This is the duration of interest to you since this is the main use of the library you will have. It only helps comparing the performances between the implemented PRNGs.
92+
93+
We currently provide them as tested with Python 3.9. We will further provide them for every version of Python above 3.9. Time unit is microsecond. Tests have been run on an Intel(R) Core(TM) i5-1035G1 CPU @ 1.00 GHz, 1190 MHz, 4 cores, 8 logical processors, 64-bits, with 8 GB RAM and over Microsoft Windows 11 ed. Family.
94+
The evaluation script is provided at the root of this repository: `testCPUPerfs.py`.
95+
96+
Up to now, it has only been run with a Python 3.9.13 (64-bits) virtual environment. Measurements with next versions of Python are to come.
97+
98+
**PyRandLib** time-64 bits:
99+
| PyRabndLib class | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 | Python 3.13 | SmallCrush fails | Crush fails | BigCrush fails |
100+
| ---------------- | ---------- | ----------- | ----------- | ----------- | ----------- | ---------------- | ----------- | -------------- |
101+
| FastRand32 | 0.91 | | | | | 11 | 106 | *too many* |
102+
| FastRand63 | 0.97 | | | | | 0 | 5 | 7 |
103+
| LFib78 | 1.08 | | | | | 0 | 0 | 0 |
104+
| LFib116 | 1.10 | | | | | 0 | 0 | 0 |
105+
| LFib668 | 1.12 | | | | | 0 | 0 | 0 |
106+
| LFib1340 | 1.12 | | | | | 0 | 0 | 0 |
107+
| MRGRand287 | 1.41 | | | | | 0 | 0 | 0 |
108+
| MRGRand1457 | 1.13 | | | | | 0 | 0 | 0 |
109+
| MRGRand49507 | 1.30 | | | | | 0 | 0 | 0 |
110+
| Well512a | 2.79 | | | | | n.a. | n.a. | n.a. |
111+
| Well1024a | 2.60 | | | | | 0 | 4 | 4 |
112+
| Well19937b (1) | 3.25 | | | | | 0 | 2 | 2 |
113+
| Well44497c | 3.69 | | | | | n.a. | n.a. | n.a. |
114+
115+
(*missing values in empty columns are to come*)
116+
88117

89118
## Implementation
90119
Current implementation of **PyRandLib** uses Python 3.x with no Cython version.

0 commit comments

Comments
 (0)