#715: Parents probably not reclaimed due to too much caching
------------------------+---------------------------------------------------
   Reporter:  robertwb  |          Owner:  somebody           
       Type:  defect    |         Status:  needs_review       
   Priority:  major     |      Milestone:  sage-4.8           
  Component:  coercion  |       Keywords:  weak cache coercion
Work_issues:            |       Upstream:  N/A                
   Reviewer:            |         Author:  Simon King         
     Merged:            |   Dependencies:  #9138, #11900      
------------------------+---------------------------------------------------

Comment(by SimonKing):

 Meanwhile I took some timings on a different machine. Based on the
 experience that the schemes code tends to slow down a lot when one does
 fancy stuff (see #11900 and #11935), I use "sage/schemes" as a test bed.

 I find (based on sage-4.8.alpha3):

 With patch
 {{{
 king@mpc622:/mnt/local/king/SAGE/rebase/sage-4.8.alpha3/devel/sage$ hg
 qapplied
 trac_12149.3.patch
 9138_flat.patch
 trac11900_category_speedup_combined.patch
 11115_flat.patch
 trac_11115_docfix.patch
 trac715_two_tripledicts.patch
 trac715_weak_action.patch
 king@mpc622:/mnt/local/king/SAGE/rebase/sage-4.8.alpha3/devel/sage$
 ../../sage -t sage/schemes/
 ...
 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 625.1 seconds
 }}}
 Here are the five worst:
 {{{
 sage -t  "devel/sage-
 main/sage/schemes/elliptic_curves/ell_rational_field.py"
          [58.1 s]
 sage -t  "devel/sage-main/sage/schemes/elliptic_curves/heegner.py"
          [51.1 s]
 sage -t  "devel/sage-
 main/sage/schemes/elliptic_curves/ell_number_field.py"
          [35.2 s]
 sage -t  "devel/sage-main/sage/schemes/elliptic_curves/padic_lseries.py"
          [26.9 s]
 sage -t  "devel/sage-main/sage/schemes/elliptic_curves/sha_tate.py"
          [25.7 s]
 }}}

 Now, the same without the two patches from here:
 {{{
 king@mpc622:/mnt/local/king/SAGE/rebase/sage-4.8.alpha3/devel/sage$ hg
 qapplied
 trac_12149.3.patch
 9138_flat.patch
 trac11900_category_speedup_combined.patch
 11115_flat.patch
 trac_11115_docfix.patch
 king@mpc622:/mnt/local/king/SAGE/rebase/sage-4.8.alpha3/devel/sage$
 ../../sage -t sage/schemes/
 ...
 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 597.0 seconds
 }}}
 And the five worst, comparing with the times from above, are:
 {{{
 sage -t  "devel/sage-
 main/sage/schemes/elliptic_curves/ell_rational_field.py"
          [55.4 s] (was: [58.1 s])
 sage -t  "devel/sage-main/sage/schemes/elliptic_curves/heegner.py"
          [47.2 s] (was: [51.1 s])
 sage -t  "devel/sage-
 main/sage/schemes/elliptic_curves/ell_number_field.py"
          [34.1 s] (was: [35.2 s])
 sage -t  "devel/sage-main/sage/schemes/elliptic_curves/padic_lseries.py"
          [26.1 s] (was: [26.9 s])
 sage -t  "devel/sage-main/sage/schemes/elliptic_curves/sha_tate.py"
          [24.9 s] (was: [25.7 s])
 }}}

 Hence, we have a slow-down of, overall, `(625.1 - 597)/625.1 = 4.5%`, the
 slow-down seems to be systematic (you hardly find an example that became
 faster), and in some cases we have a slow-down of 10%.

 I expected it to be worse (after all, coercion affects everything). But
 still, the question is: Can the slow-down be avoided?

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