#11900: Serious regression caused by #9138
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |          Owner:  tbd                  
       Type:  defect       |         Status:  new                  
   Priority:  blocker      |      Milestone:  sage-4.7.2           
  Component:  performance  |       Keywords:  categories regression
Work_issues:               |       Upstream:  N/A                  
   Reviewer:               |         Author:  Simon King           
     Merged:               |   Dependencies:  #9138                
---------------------------+------------------------------------------------

Comment(by SimonKing):

 The crucial question: Does it fix the speed regression?

 Here are Jeroen's examples from sage-devel.

 '''sage-4.7.2.alpha2'''

 {{{
 sage: %time D = J0(46).endomorphism_ring().discriminant()
 CPU times: user 5.60 s, sys: 0.21 s, total: 5.81 s
 Wall time: 5.83 s
 sage: %time TestSuite(CrystalOfTableaux(['B',4],shape=[2,1,1,0])).run()
 CPU times: user 7.08 s, sys: 0.03 s, total: 7.11 s
 Wall time: 7.75 s
 sage: W.<z> = CyclotomicField(13)
 sage: %time M = Matrix(W, 2, 3, [10^30*(1-z)^13, 1, 2, 3, 4,
 z]).echelon_form()
 CPU times: user 3.29 s, sys: 0.03 s, total: 3.32 s
 Wall time: 3.38 s
 sage: %time L = EllipticCurve('960d1').prove_BSD()
 CPU times: user 3.73 s, sys: 0.04 s, total: 3.78 s
 Wall time: 4.01 s
 sage: def test(E):
 ....:     for p in prime_range(10000):
 ....:         if p != 389:
 ....:             G = E.change_ring(GF(p)).abelian_group()
 ....:
 sage: E = EllipticCurve('389a')
 sage: %time test(E)
 CPU times: user 16.47 s, sys: 0.04 s, total: 16.50 s
 Wall time: 16.73 s
 sage: %time for E in cremona_curves([11..100]): S =
 E.integral_points(both_signs=False)
 CPU times: user 13.88 s, sys: 0.06 s, total: 13.94 s
 Wall time: 14.01 s
 }}}

 '''sage-4.7.2.alpha2 plus #9138 and its dependency'''
 {{{
 sage: %time D = J0(46).endomorphism_ring().discriminant()
 CPU times: user 8.80 s, sys: 0.15 s, total: 8.95 s
 Wall time: 8.98 s
 sage: %time TestSuite(CrystalOfTableaux(['B',4],shape=[2,1,1,0])).run()
 CPU times: user 7.11 s, sys: 0.03 s, total: 7.14 s
 Wall time: 7.48 s
 sage: W.<z> = CyclotomicField(13)
 sage: %time M = Matrix(W, 2, 3, [10^30*(1-z)^13, 1, 2, 3, 4,
 z]).echelon_form()
 CPU times: user 6.07 s, sys: 0.02 s, total: 6.09 s
 Wall time: 6.13 s
 sage: %time L = EllipticCurve('960d1').prove_BSD()
 CPU times: user 10.10 s, sys: 0.07 s, total: 10.17 s
 Wall time: 10.55 s
 sage: def test(E):
 ....:     for p in prime_range(10000):
 ....:         if p != 389:
 ....:             G = E.change_ring(GF(p)).abelian_group()
 ....:
 sage: E = EllipticCurve('389a')
 sage: %time test(E)
 CPU times: user 23.03 s, sys: 0.05 s, total: 23.08 s
 Wall time: 23.18 s
 sage: %time for E in cremona_curves([11..100]): S =
 E.integral_points(both_signs=False)
 CPU times: user 16.29 s, sys: 0.05 s, total: 16.34 s
 Wall time: 16.48 s
 }}}

 '''sage-4.7.2.alpha2 plus #9138 and its dependency plus the patch from
 here'''
 {{{
 sage: %time D = J0(46).endomorphism_ring().discriminant()
 CPU times: user 6.02 s, sys: 0.20 s, total: 6.22 s
 Wall time: 6.23 s
 sage: %time TestSuite(CrystalOfTableaux(['B',4],shape=[2,1,1,0])).run()
 CPU times: user 7.11 s, sys: 0.01 s, total: 7.12 s
 Wall time: 7.39 s
 sage: W.<z> = CyclotomicField(13)
 sage: %time M = Matrix(W, 2, 3, [10^30*(1-z)^13, 1, 2, 3, 4,
 z]).echelon_form()
 CPU times: user 3.81 s, sys: 0.04 s, total: 3.84 s
 Wall time: 3.85 s
 sage: %time L = EllipticCurve('960d1').prove_BSD()
 CPU times: user 6.11 s, sys: 0.07 s, total: 6.18 s
 Wall time: 6.20 s
 sage: def test(E):
 ....:     for p in prime_range(10000):
 ....:         if p != 389:
 ....:             G = E.change_ring(GF(p)).abelian_group()
 ....:
 sage: E = EllipticCurve('389a')
 sage: %time test(E)
 CPU times: user 18.11 s, sys: 0.07 s, total: 18.17 s
 Wall time: 18.23 s
 sage: %time for E in cremona_curves([11..100]): S =
 E.integral_points(both_signs=False)
 CPU times: user 13.13 s, sys: 0.05 s, total: 13.18 s
 Wall time: 13.22 s
 }}}

 '''__Conclusion__'''

 #9138 is indeed responsible for all but one regression. The only exception
 is the test suite for `CrytalOfTableaux`; it has already been argued on
 sage-devel that it is actually not a regression, since the test suite
 became much longer by #11183.

 The patch from here fixes most regressions. Problematic remain the
 `EllipticCurve('960d1').prove_BSD()` and the
 `E.change_ring(GF(p)).abelian_group()` tests.

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