SIGN IN SIGN UP
TheAlgorithms / Python UNCLAIMED

All Algorithms implemented in Python

0 0 1 Python

improved prime number generator to check only up to sqrt(n) instead of n (#1984)

* improved prime number generator to check only up to sqrt(n) instead of n

* added old version as slow_primes() and named new, faster version primes()

* fixed docstring in slow_primes

* Add a timeit benchmark

* Update prime_numbers.py

Co-authored-by: Christian Clauss <[email protected]>
S
Steven Qu committed
c8fbdee2294fcc14d002ee7ef9f6a3d8dcb66636
Parent: 48bb14d
Committed by GitHub <[email protected]> on 5/14/2020, 10:33:50 PM