[Python-ideas] Python's Source of Randomness and the random.py module Redux
Donald Stufft
donald at stufft.io
Thu Sep 10 20:50:35 CEST 2015
On September 10, 2015 at 1:24:05 PM, Tim Peters (tim.peters at gmail.com) wrote:
>
> So now you know how to make it more directly comparable. The
> high-order bit is that it requires 2 calls to the 32-bit uint integer
> primitive to get a double, and that can indeed be significant.
It didn’t change the results really though:
My OSX El Capitan machine:
Number of Calls: 10000000
+---------------+---------------------+
| method | usecs per call |
+---------------+---------------------+
| deterministic | 0.05792283279588446 |
| system | 1.7192466521984897 |
| userland | 0.17901834140066059 |
+---------------+——————————+
An OpenBSD 5.7 VM:
Number of Calls: 10000000
+---------------+---------------------+
| method | usecs per call |
+---------------+---------------------+
| deterministic | 0.06555143180000868 |
| system | 0.8929547749999983 |
| userland | 0.16291017429998647 |
+---------------+---------------------+
-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
More information about the Python-ideas
mailing list