[Python-ideas] PEP 504: Using the system RNG by default

Random832 random832 at fastmail.com
Wed Sep 16 19:09:43 CEST 2015


On Wed, Sep 16, 2015, at 11:54, Nick Coghlan wrote:
> * random._inst is a SystemRandom() instance by default

He has a point on the performance issue. The difference between Random
and SystemRandom on my machine is significantly more than an order of
magnitude. (Calling libc's arc4random with ctypes was roughly in the
middle, though I *suspect* a lot of that was due to ctypes overhead).


More information about the Python-ideas mailing list