#11521: Memleak when resolving the action of Integers on an Elliptic Curve
------------------------+---------------------------------------------------
   Reporter:  jpflori   |          Owner:  robertwb    
       Type:  defect    |         Status:  needs_review
   Priority:  major     |      Milestone:  sage-4.8    
  Component:  coercion  |       Keywords:              
Work_issues:            |       Upstream:  N/A         
   Reviewer:            |         Author:              
     Merged:            |   Dependencies:              
------------------------+---------------------------------------------------

Comment(by SimonKing):

 I think we have a different problem here.

 The finite fields themselves should be cached. The cache (see `GF._cache`)
 uses weak references, which should be fine.

 Also, there are special methods `zero_element` and `one_element` which
 should do caching, because zero and one are frequently used and should not
 be created over and over again.

 However, it seems that ''all'' elements of a finite field are cached - and
 that's bad!
 {{{
 sage: K = GF(5)
 sage: K(2) is K(2)
 True
 sage: K.<a> = GF(17^2)
 sage: K(5) is K(5)
 True
 }}}

 I see absolutely no reason why all `17^2` elements should be cached.

 Fortunately, we have no caching for larger finite fields:
 {{{
 sage: K.<a> = GF(17^10)
 sage: K(5) is K(5)
 False
 }}}

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