#13378: Do not cache the non-existence of coerce/convert map too often, and do 
not
pretend that there is a conversion where it doesn't make sense at all
----------------------------------------------------+-----------------------
       Reporter:  SimonKing                         |         Owner:  robertwb  
  
           Type:  defect                            |        Status:  
needs_review
       Priority:  major                             |     Milestone:  sage-5.6  
  
      Component:  coercion                          |    Resolution:            
  
       Keywords:  coercion conversion object cache  |   Work issues:            
  
Report Upstream:  N/A                               |     Reviewers:            
  
        Authors:  Simon King                        |     Merged in:            
  
   Dependencies:                                    |      Stopgaps:            
  
----------------------------------------------------+-----------------------

Comment (by SimonKing):

 Too bad/good, I just tested it with sage-5.6.beta1:
 {{{
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 147 µs per loop
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 144 µs per loop
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 147 µs per loop
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 148 µs per loop
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 146 µs per loop
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 147 µs per loop
 sage: %timeit a = ZZ.ideal(5)
 625 loops, best of 3: 148 µs per loop
 sage: %timeit a = ZZ.has_coerce_map_from(5)
 625 loops, best of 3: 82.1 µs per loop
 sage: %timeit a = ZZ.has_coerce_map_from(5)
 625 loops, best of 3: 81.4 µs per loop
 sage: %timeit a = ZZ.has_coerce_map_from(5)
 625 loops, best of 3: 81.3 µs per loop
 }}}
 So, the problem mentioned at #13400 does currently not exist.

 We should investigate why it is not a problem.

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