[Python-ideas] Add the imath module
Tim Peters
tim.peters at gmail.com
Fri Jul 13 12:16:24 EDT 2018
>
> [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.
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180713/1a3d0ef8/attachment.html>
More information about the Python-ideas
mailing list