#14058: Weakly reference binary operation codomains
-----------------------------------+----------------------------------------
       Reporter:  robertwb         |         Owner:  rlm         
           Type:  enhancement      |        Status:  needs_review
       Priority:  major            |     Milestone:  sage-5.7    
      Component:  memleak          |    Resolution:              
       Keywords:                   |   Work issues:              
Report Upstream:  N/A              |     Reviewers:              
        Authors:  Robert Bradshaw  |     Merged in:              
   Dependencies:  #12313           |      Stopgaps:              
-----------------------------------+----------------------------------------

Comment (by nbruin):

 Replying to [comment:18 SimonKing]:
 > By the way, it seems that the "insufficient" caching (not enough to keep
 C() alive) has no influence on performance, at least not if computations
 are done in a close cycle:
 Ah right, because `C._coerce_from_hash[A]._codomain is C`, there's a cycle
 involving C so instead of getting deleted eagerly by Python's refcounting,
 it's only done with (relatively infrequent) GCs. So it even comes with a
 trick to improve this free "caching": Increase the interval for garbage
 collection. See `gc.get_threshold` and `gc.set_threshold`. By tweaking
 those numbers you can probably manipulate the running times in these
 examples.

 '''NOTE:''' Doesn't `timeit` turn garbage collection off? So that may be a
 misleading tool for investigating performance for these things.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14058#comment:19>
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.


Reply via email to