#12313: Fix yet another memory leak caused by caching of coercion data
--------------------------------------------------------+-------------------
Reporter: SimonKing | Owner:
Type: defect | Status:
positive_review
Priority: major | Milestone:
sage-5.7
Component: memleak | Resolution:
Keywords: coercion weak dictionary | Work issues:
Report Upstream: N/A | Reviewers: Simon
King, Jean-Pierre Flori, John Perry, Nils Bruin
Authors: Simon King, Jean-Pierre Flori | Merged in:
Dependencies: #715, #11521, #12215, #13746, #13378 | Stopgaps:
--------------------------------------------------------+-------------------
Comment (by nbruin):
Replying to [comment:295 jdemeyer]:
The profile calls look exactly the same. More time is spent in
`sage.rings.arith.kronecker_symbol`, though and oddly enough the time
seems to go into conversion from `ZZ` to `QQ`:
{{{
x=-20
def test():
for n in xrange(10**7):
_=QQ(x)
sage: time test()
}}}
goes from `Time: CPU 2.97 s, Wall: 2.98 s` to `Time: CPU 8.53 s, Wall:
8.57 s`. Python level profiling doesn't tell us anything for this.
I suspect that the whole ` QQ(x).numerator() * QQ(x).denominator()` thing
here is actually unnecessary for the purposes where it's used (it doesn't
do anything of the sort for `y`), but that's rather irrelevant: This seems
to be a case where discovery of a rather obvious conversion seems to have
become quite a bit more expensive!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12313#comment:300>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.