On Saturday, November 23, 2019 at 12:38:35 PM UTC-8, vdelecroix wrote:
>
> Le 23/11/2019 à 11:34, John H Palmieri a écrit : 
> > By the way, Integer(1r) is also faster with Python 2 than with Python 3. 
>
> By how much? Does it explain the 25% slowdown of the original post? 
>

Python 2:

sage: %timeit Integer(1r)
The slowest run took 41.65 times longer than the fastest. This could mean 
that an intermediate result is being cached.
10000000 loops, best of 3: 45.8 ns per loop
sage: %time Integer(2r)
CPU times: user 3 µs, sys: 2 µs, total: 5 µs
Wall time: 5.01 µs
2

Python 3:

sage: %timeit Integer(1r)
The slowest run took 25.70 times longer than the fastest. This could mean 
that an intermediate result is being cached.
10000000 loops, best of 5: 71.2 ns per loop
sage: %time Integer(2r)
CPU times: user 3 µs, sys: 1 µs, total: 4 µs
Wall time: 6.91 µs
2

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/32ea3b6d-7a8c-452f-9796-45570135bbd7%40googlegroups.com.

Reply via email to