#13400: Use strong caches diligently
-------------------------------+--------------------------------------------
       Reporter:  nbruin       |         Owner:  robertwb     
           Type:  enhancement  |        Status:  new          
       Priority:  major        |     Milestone:  sage-wishlist
      Component:  coercion     |    Resolution:               
       Keywords:               |   Work issues:               
Report Upstream:  N/A          |     Reviewers:               
        Authors:               |     Merged in:               
   Dependencies:               |      Stopgaps:               
-------------------------------+--------------------------------------------

Comment (by SimonKing):

 Replying to [comment:11 nbruin]:
 > What I see is
 > `sage/categories/covariant_functorial_construction.py:359`:

 Yes, I was talking about the is_subcategory method in
 sage/categories/category.py. I didn't know that the covariant functorial
 constructions have their own method (which may be deletable, according to
 Nicolas, provided tests pass)

 > {{{#!python
 >     @cached_method
 >     def is_subcategory(self, C):
 >         """
 >         .. todo:: doctests + explain why this method is needed
 >         """
 >         if C is self:
 >             return True
 >         return any(X.is_subcategory(C) for X in self._super_categories)
 > }}}

 Just for clarification: The @cached_method is your addition, isn't it?

 Anyway. If deleting the method is an option, then we should try it. After
 all, it isn't cached ''at all'', in contrast to what is done in the
 default is_subcategory method. Plus, if it turns out that my experimental
 patch gives more speed, I may consider to make it a proper patch.

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