#13991: Mitigate speed regressions in symmetric function related code due to
#12313
---------------------------------+------------------------------------------
Reporter: nbruin | Owner: sage-combinat
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.8
Component: combinatorics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #13605 | Stopgaps:
---------------------------------+------------------------------------------
Comment (by nbruin):
In fact, with `WeylGroup` getting recreated every time (assuming it's a
`UniqueRepresentation` type parent), the problem is that `WeylGroup`
doesn't linger in memory long enough. As an alternative, you may try
putting a circular reference on WeylGroup i.e.,
{{{#!diff
def __init__(self,...):
...
+ self.self = self
...
}}}
it means that the object will linger until the next GC, which might
provide enough caching. I'm not proposing that we actually do this, but it
will give you an interesting data point.
I think general python advice is to try and avoid circular references as
much as possible, so relying on GC too much might not be so good for
performance. On the other hand, Sage is already heavily relying on GC, so
perhaps using GC as a cache of recently created parents doesn't make all
that much of a difference.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13991#comment:43>
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.