Consider the following script, which saves a p-adic matrix and then
repeatedly loads it into a list:

==================================
from time import time

K = Qp(13, 10)
M = Matrix(K, [[K.random_element() for j in range(200)] for k in range(200)])
M.save("thing.sobj")

L = []
for i in range(40):
    last = time()
    L.append(load("thing.sobj"))
    now = time()
    print "took %.2f seconds" % (now - last)
    last = now

==================================

Here is typical output for sage 4.5.3, AMD linux:

==================================

took 0.21 seconds
took 0.21 seconds
took 0.39 seconds
took 0.21 seconds
took 0.44 seconds
took 0.21 seconds
took 0.48 seconds
took 0.21 seconds
took 0.21 seconds
took 0.51 seconds
took 0.21 seconds
took 0.56 seconds
took 0.21 seconds
took 0.60 seconds
took 0.21 seconds
took 0.21 seconds
took 0.64 seconds
took 0.20 seconds
took 0.69 seconds
took 0.20 seconds
took 0.73 seconds
took 0.20 seconds
took 0.21 seconds
took 0.77 seconds
took 0.21 seconds
took 0.81 seconds
took 0.20 seconds
took 0.86 seconds
took 0.21 seconds
took 0.21 seconds
took 0.89 seconds
took 0.20 seconds
took 0.94 seconds
took 0.20 seconds
took 0.98 seconds
took 0.20 seconds
took 0.21 seconds
took 1.02 seconds
took 0.20 seconds
took 1.07 seconds

==================================

About half of them are 0.2 seconds, but the rest keep getting longer and
longer, apparently the increase is linear in the number of iterations.
This smells like some kind of weird leak, but I'm not sure. Any thoughts?

david


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to