#9138: Categories for polynomial rings
--------------------------+-------------------------------------------------
   Reporter:  jbandlow    |       Owner:  nthiery                  
       Type:  defect      |      Status:  needs_review             
   Priority:  major       |   Milestone:  sage-4.7                 
  Component:  categories  |    Keywords:  introspection, categories
     Author:  Simon King  |    Upstream:  N/A                      
   Reviewer:              |      Merged:                           
Work_issues:              |  
--------------------------+-------------------------------------------------
Changes (by SimonKing):

  * status:  needs_info => needs_review


Comment:

 With the latest patches, I obtain the following timings:

 {{{
 sage: R.<x> = ZZ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 25.8 µs per loop
 sage: R.<x> = QQ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 27.8 µs per loop
 sage: R.<x> = GF(3)[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 112 µs per loop
 sage: R.<x> = QQ['t'][]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 124 µs per loop
 sage: R.<x,y> = ZZ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 12.7 µs per loop
 sage: R.<x,y> = QQ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 15.7 µs per loop
 sage: R.<x,y> = GF(3)[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 10.3 µs per loop
 sage: R.<x,y> = QQ['t'][]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 148 µs per loop
 }}}

 Without these patches:
 {{{
 sage: R.<x> = ZZ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 22.7 µs per loop
 sage: R.<x> = QQ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 24.2 µs per loop
 sage: R.<x> = GF(3)[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 87 µs per loop
 sage: R.<x> = QQ['t'][]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 113 µs per loop
 sage: R.<x,y> = ZZ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 13 µs per loop
 sage: R.<x,y> = QQ[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 16.3 µs per loop
 sage: R.<x,y> = GF(3)[]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 10.5 µs per loop
 sage: R.<x,y> = QQ['t'][]
 sage: timeit('(2*x-1)^2+5', number=10^4)
 10000 loops, best of 3: 237 µs per loop
 }}}

 In other words, there is a mild deceleration in the univariate case and a
 mild (and in one case considerable) ''acceleration'' in the multivariate
 case.

 I don't understand why. But perhaps a reviewer has an idea, and can also
 state his or her opinion how bad the deceleration is compared with the
 acceleration?

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