#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.7     
      Component:  combinatorics  |    Resolution:               
       Keywords:                 |   Work issues:               
Report Upstream:  N/A            |     Reviewers:               
        Authors:                 |     Merged in:               
   Dependencies:                 |      Stopgaps:               
---------------------------------+------------------------------------------

Comment (by nbruin):

 Replying to [comment:6 SimonKing]:
 > I expected that it would be called once, and then cached. But why is no
 homset created, even though coercion maps should certainly be involved?

 Probably the homsets are associated with the coercion maps.
 Without #12313 coercion maps are blessed with eternal life (or at least as
 long as the life of the object they are mapping ''to''), thus saving the
 domains as well. When those domains are re-used, it finds the coercion map
 that was stored and it doesn't need to create a new homset.

 Note that `k_dual` gives a ''dual'' basis, so these are finitely generated
 ''quotients'' rather than finitely generated subspaces. I can imagine how
 for a computer algebra system that means you end up with a more
 complicated construction; one where you can more easily lose track of a
 parent. If you end up recreating that think, you have to rediscover (and
 construct!) the coercion; with its homset. In particular, to do
 arithmetic, you always end up lifting and projecting down again. Something
 that probably shouldn't be done via the coercion framework, since you
 already know which homomorphism to apply, but clearly is done.

 Also note that `k_dual` is one of the recent recent additions there and
 has a different author list than the other files. It says explicitly that
 it's ''based'' on similar code elsewhere. The authors might not have
 carried through all the original design decision (and forgotten the
 caching of some associated stucture somewhere)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13991#comment:7>
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 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-trac?hl=en.

Reply via email to