Dear Robert, On 24 Okt., 06:46, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > Well, memory leaks are always possible, but this should be safe (i.e. > if there's a bug, it's in Cython). Can you post what your class > definition is?
It is the Toy-F5 that I implemented at Sage Days 10. See http://sage.math.washington.edu/home/SimonKing/f5/f5.pyx > Are you running this from the command line? Yes. The example is: sage: attach f5.pyx Compiling /home/SimonKing/f5/f5.pyx... sage: from sage.rings.ideal import Cyclic sage: R=PolynomialRing(QQ,'x',5) sage: I=Cyclic(R) sage: F=F5() sage: time G1=F(I) # removing some protocol output CPU times: user 0.30 s, sys: 0.02 s, total: 0.32 s Wall time: 0.32 s sage: G1==I.groebner_basis() True sage: del F sage: get_memory_usage() 423.21484375 sage: for i in range(100): F=F5() G1=F(I) del F # removing protocol output sage: get_memory_usage() 681.00390625 sage: (_-423.21484375)/100 2.57789062500000 > try doing the whole operation in a function body > and see if the results are the same. sage: def f(n): for i in range(n): F=F5() G1=F(I) sage: f(100) # removing protocol sage: get_memory_usage() 938.33984375 sage: (_-681.00390625)/100 2.57335937500000 So, that's about the same. I wonder one thing: Could the ~2.58 MB come from the protocol that my function prints? Cheers Simon --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
