12 ms·
This is the real answer, although the algorithm used seems to use a sieve rather than a naive check for (x & i == 0) https://github.com/sympy/sympy/blob/219993
by joshka 6y ago
This is the real answer, although the algorithm used seems to use a sieve rather than a naive check for (x & i == 0)
https://github.com/sympy/sympy/blob/219993505f88a8d6f825db1deaad939a28cbb78c/sympy/ntheory/generate.py#L417-L528 https://github.com/sympy/sympy/blob/219993505f88a8d6f825db1d...
- igouy 6y agoNo, this is the real answer: https://web.archive.org/web/20010606131022/http://www.bagley.org/~doug/shootout/bench/sieve/ https://web.archive.org/web/20010606131022/http://www.bagley...