#11115: Rewrite cached_method in Cython
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  jason                
       Type:  enhancement  |         Status:  needs_review         
   Priority:  major        |      Milestone:  sage-4.7             
  Component:  misc         |       Keywords:  category cython cache
Work_issues:               |       Upstream:  N/A                  
   Reviewer:               |         Author:  Simon King           
     Merged:               |   Dependencies:                       
---------------------------+------------------------------------------------

Comment(by SimonKing):

 PS: Here is another test.

 With sage-4.7.alpha5 and no patches applied:
 {{{
 sage: get_memory_usage()
 839.96484375
 sage: K = GF(next_prime(10^6))
 sage: %time L = [K(i) for i in xrange(10^6)]
 CPU times: user 4.00 s, sys: 0.06 s, total: 4.05 s
 Wall time: 4.06 s
 sage: get_memory_usage()
 929.83203125
 sage: 929.83203125 - 839.96484375
 89.8671875000000
 }}}

 With sage-4.7.alpha5 and the patches applied:
 {{{
 sage: get_memory_usage()
 841.9921875
 sage: K = GF(next_prime(10^6))
 sage: %time L = [K(i) for i in xrange(10^6)]
 CPU times: user 4.25 s, sys: 0.03 s, total: 4.28 s
 Wall time: 4.28 s
 sage: get_memory_usage()
 938.6953125
 sage: 938.6953125 - 841.9921875
 96.7031250000000
 }}}

 I don't know why it became slower - as I mentioned above, the element
 creation in `GF(101)` became faster. However, when many elements are
 created then the memory consumption increases by something like 7.5%:
 {{{
 sage: (96.7031250000000-89.8671875000000)/89.8671875000000
 0.0760671129270625
 }}}
 That may be too much.

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