>
> [Steven D'Aprano]
>  > about 4.7 seconds to test 2**800 + 1;
>
> [Jeroen Demeyer]
>
>> In SageMath:
>>
>> sage: n = 2**800+1; timeit('is_prime(n)')
>> 625 loops, best of 3: 303 µs per loop
>>
>> That's 4 orders of magnitude faster...
>
>
[Tim]

> More like 6, yes?
>

Heh - sorry about that.  A speck of dirt on my monitor made me read '303"
as "3.03".


>   My Python version is more like 3, but is way fast enough for most things
> I do:
>

So my Python Miller-Rabin code (already shared) was about one order of
magnitude slower.
 ...
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to