#13370: Do not cache the result of is_Field externally
------------------------------------------------------------------+---------
       Reporter:  SimonKing                                       |         
Owner:  rlm            
           Type:  defect                                          |        
Status:  positive_review
       Priority:  major                                           |     
Milestone:  sage-5.8       
      Component:  memleak                                         |    
Resolution:                 
       Keywords:                                                  |   Work 
issues:                 
Report Upstream:  N/A                                             |     
Reviewers:  Nils Bruin     
        Authors:  Simon King                                      |     Merged 
in:                 
   Dependencies:  #11310, #12215, #11521, #12313, #13089, #12995  |      
Stopgaps:                 
------------------------------------------------------------------+---------

Comment (by nbruin):

 Something that struck me. With the current trick,
 {{{
 sage: R=ZZ.quo(7)
 sage: %timeit R in Fields()
 }}}
 is going to be pretty efficient, because the category of R reflects it's a
 field after the first test. However,
 {{{
 sage: R=ZZ.quo(15)
 sage: %timeit R in Fields()
 }}}
 probably isn't efficient (but it probably wasn't before either), because
 there's no way to register it's NOT a field in its category.

 I recognize that frequently asking whether a field is indeed a field will
 happen a lot, whereas frequently confirming something is NOT a field will
 probably be considerably less common, so perhaps it's not a problem. It
 does reflect that this solution is accomplishing something quite different
 from just making `is_Field` efficient without external cache.

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