Closed evaldsurtans closed 7 years ago
On latest python 2.7 your library is faster
python -m timeit -s 'import fastrand' 'fastrand.pcg32bounded(1001)' 10000000 loops, best of 3: 0.0994 usec per loop
python -m timeit -s 'import numpy' 'numpy.random.randint(0, 1000)' 1000000 loops, best of 3: 1.07 usec per loop
so, I think this should be removed from readme :)
David Andersen points out that python -m timeit -s 'import numpy' 'numpy.random.randint(0, 1000)' is much faster.
Quite right.
On latest python 2.7 your library is faster
python -m timeit -s 'import fastrand' 'fastrand.pcg32bounded(1001)' 10000000 loops, best of 3: 0.0994 usec per loop
python -m timeit -s 'import numpy' 'numpy.random.randint(0, 1000)' 1000000 loops, best of 3: 1.07 usec per loop
so, I think this should be removed from readme :)
David Andersen points out that python -m timeit -s 'import numpy' 'numpy.random.randint(0, 1000)' is much faster.