#5970: Weak references in Polynomial Ring cache
--------------------------------------------+-------------------------------
   Reporter:  SimonKing                     |       Owner:  malb                
                
       Type:  defect                        |      Status:  needs_info          
                
   Priority:  critical                      |   Milestone:  sage-4.3.3          
                
  Component:  commutative algebra           |    Keywords:  polynomial ring 
cache weak reference
     Author:                                |    Upstream:  N/A                 
                
   Reviewer:                                |      Merged:                      
                
Work_issues:  regression for test_ec_leak?  |  
--------------------------------------------+-------------------------------
Changes (by SimonKing):

  * status:  needs_review => needs_info
  * work_issues:  => regression for test_ec_leak?


Comment:

 Hi!

 Taking the `test.sage` file, modifying it by scaling the output by the
 number of examples, I obtain with sage-4.3.2:

 {{{
 sage: attach test.sage
 sage: %time test_poly_leak(10^5)
 CPU times: user 9.38 s, sys: 0.24 s, total: 9.62 s
 Wall time: 9.63 s
 0.032462354696622182
 sage: %time test_ec_leak(10^5)
 CPU times: user 39.26 s, sys: 0.26 s, total: 39.51 s
 Wall time: 39.52 s
 0.021538141944734097
 sage: %time test_pc_leak(10^5)
 CPU times: user 14.63 s, sys: 0.05 s, total: 14.68 s
 Wall time: 14.70 s
 0.0056423158621768136
 }}}
 With the patch (that applies, though with a warning), I obtain:

 {{{
 sage: attach test.sage
 sage: %time test_poly_leak(10^5)
 CPU times: user 8.01 s, sys: 0.07 s, total: 8.08 s
 Wall time: 8.12 s
 0.0073502821361551294
 sage: %time test_ec_leak(10^5)
 CPU times: user 49.45 s, sys: 0.34 s, total: 49.79 s
 Wall time: 49.86 s
 0.047167052267987487
 sage: %time test_pc_leak(10^5)
 CPU times: user 14.94 s, sys: 0.08 s, total: 15.02 s
 Wall time: 15.08 s
 0.005620324880108424
 }}}
 Now that's kind of strange. In one of the three tests, there is an
 improvement in both memory and CPU consumption, in one example more or
 less nothing changes, and in one example there is a regression in both
 memory and CPU.

 At least, for quite a while I did heavy polynomial computations, involving
 the temporary creation of many polynomial rings. It never crashed.

 So, I would give it a positive review, if there wouldn't be the regression
 in one of the tests.

 Can you explain why this regression occurs?

 Best regards,

 Simon

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