On 27/02/2018 02:27, Chris Angelico wrote:
On Tue, Feb 27, 2018 at 12:57 PM, bartc <b...@freeuk.com> wrote:
On 27/02/2018 00:35, Chris Angelico wrote:

Anyway, even this pure Python version can deliver pseudo random numbers at
some 200,000 per second, while the built-in generator does 450,000 per
second, so it's not bad going.

The built-in generator is using a completely different algorithm
though, so rate of generation isn't the entire story. How long is the
period of the one you're using? (How long before it loops?)

I believe it's 5*2**1320480*(2**64-1) according to the author's comment.

I haven't tested that.

(By looping I understand that to mean, before the same sequence starts again. Because as the numbers are 64 bits, individual numbers will inevitably be repeated from time to time.)


--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to