Something like object creation, memory allocation, basic arithmetic, or 
cython calls seems to have become a lot slower recently.

Overall, my Python code using sage runs about 10% slower with 9.0.beta6 
than with 8.9. The slowdown seems to be spread evenly across many 
different functions.

But here is a simple example that shows a significant difference:

# 8.9
sage: def f():
....:     a = 0
....:     for i in xrange(10^7):
....:         a += 1
sage: %time f()
CPU times: user 1.27 s, sys: 3 ms, total: 1.28 s
Wall time: 1.27 s

# 9.0.beta6
sage: def f():
....:     a = 0
....:     for i in range(10^7):
....:         a += 1
sage: %time f()
CPU times: user 1.71 s, sys: 0 ns, total: 1.71 s
Wall time: 1.7 s

Note that a similar function running an empty loop is quite a bit 
*faster* with 9.0.beta6 (as one may have expected with the Python 
upgrade): ~260 ms vs ~300 ms.

Also,

sage: %time a = 3**(2**30+1)

and other computations using GMP with no back-and-forth with Python run 
at the same speed with both versions, so GMP/MPIR versions or build 
options are probably not to blame.

Any clue what is going on?

-- 
Marc

-- 
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/qrbugi%241h5h%241%40blaine.gmane.org.

Reply via email to