#11900: Serious regression caused by #9138
-----------------------------------------------------------------------------------+
   Reporter:  SimonKing                                                         
   |          Owner:  tbd                  
       Type:  defect                                                            
   |         Status:  needs_work           
   Priority:  critical                                                          
   |      Milestone:  sage-4.8             
  Component:  performance                                                       
   |       Keywords:  categories regression
Work_issues:  finalize the patch with the different ideas that have been 
explored  |       Upstream:  N/A                  
   Reviewer:  Jeroen Demeyer, Nicolas M. ThiƩry                                 
   |         Author:  Simon King           
     Merged:                                                                    
   |   Dependencies:  #9138 #11911         
-----------------------------------------------------------------------------------+

Comment(by SimonKing):

 For the record: With the latest patches, one gets some doctest errors, but
 they seem managable:
 {{{
         sage -t  devel/sage-
 main/sage/rings/polynomial/polynomial_quotient_ring.py # 6 doctests failed
         sage -t  devel/sage-main/sage/categories/pushout.py # 1 doctests
 failed
         sage -t  devel/sage-
 main/sage/rings/polynomial/polynomial_quotient_ring_element.py # 6
 doctests failed
         sage -t  devel/sage-main/sage/combinat/debruijn_sequence.pyx # 21
 doctests failed
         sage -t  devel/sage-main/sage/misc/constant_function.pyx # 2
 doctests failed
         sage -t  devel/sage-main/sage/categories/category_singleton.pyx #
 1 doctests failed
 }}}

 Concerning timings, I find with sage-4.7.2+#9138+the stuff from here the
 following results for the benchmarks that I posted five weeks ago. By
 "vanilla sage", I mean sage-4.7.2.alpha2 unpatched (copying the timings
 from above):

 __Creation of Matrix spaces__

 It is as with the previous patch versions, hence, faster than vanilla sage
 sage (0.38 s cpu):
 {{{
 sage: def test():
 ....:     for i in xrange(5000):
 ....:         MS = MatrixSpace(QQ,i)
 ....:
 sage: %time test()
 CPU times: user 0.25 s, sys: 0.01 s, total: 0.26 s
 Wall time: 0.26 s
 }}}

 __Creation of finite fields__

 It is faster than with the previous patches. Even better, it is now faster
 than vanilla sage (0.60 s cpu), which has not been the case with the
 previous patches:
 {{{
 sage: def test():
 ....:     for p in prime_range(10000):
 ....:         P = GF(p)
 ....:
 sage: %time test()
 CPU times: user 0.53 s, sys: 0.00 s, total: 0.53 s
 Wall time: 0.53 s
 }}}

 __Creation of polynomial rings__

 It is slower than vanilla sage (2.41 s cpu), but a bit faster than what I
 had with the patches 5 weeks ago (4.32 s CPU):
 {{{
 sage: def test():
 ....:     for p in prime_range(10000):
 ....:         P = GF(p)['x']
 ....:         P = GF(p)['x','y']
 ....:
 sage: %time test()
 CPU times: user 3.92 s, sys: 0.05 s, total: 3.97 s
 Wall time: 3.98 s
 }}}

 '''__The two critical elliptic curve tests__'''

 Recall that the following two were most critical and were the reason for
 creating this ticket:
 {{{
 sage: %time L = EllipticCurve('960d1').prove_BSD()
 CPU times: user 3.96 s, sys: 0.08 s, total: 4.04 s
 Wall time: 4.25 s
 }}}
 That's about as fast as vanilla sage (CPU time went up a bit, wall time
 went down a bit)

 {{{
 sage: def test():
 ....:     E = EllipticCurve('389a')
 ....:     for p in prime_range(10000):
 ....:         if p != 389:
 ....:             G = E.change_ring(GF(p)).abelian_group()
 ....:
 sage: %time test()
 CPU times: user 16.53 s, sys: 0.14 s, total: 16.67 s
 Wall time: 16.72 s
 }}}
 Again, that can very well compete with vanilla sage (16.57 s cpu, 16.77 s
 wall).

 '''__TODO__'''

 Instead of `P.is_ring()`, define `_Rings = Rings()` and test `P in
 _Rings`. Nicolas, please tell whether I forgot further things todo on this
 ticket.

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