#13441: refactor gcd
------------------------------------+---------------------------------------
       Reporter:  saraedum          |         Owner:  AlexGhitza
           Type:  task              |        Status:  needs_work
       Priority:  trivial           |     Milestone:  sage-5.4  
      Component:  basic arithmetic  |    Resolution:            
       Keywords:                    |   Work issues:            
Report Upstream:  N/A               |     Reviewers:            
        Authors:  Julian Rueth      |     Merged in:            
   Dependencies:                    |      Stopgaps:            
------------------------------------+---------------------------------------

Comment (by saraedum):

 The speed problems seem to be resolved with the new patch:

 Without the patch:
 {{{
 sage: sage: R.<t>=PolynomialRing(GF(3),implementation="NTL")
 sage: sage: x,y=t^2-1,t-1
 sage: sage: sage: timeit('x.gcd(y)')
 625 loops, best of 3: 35.5 µs per loop
 age: sage: x,y=234/234525,4324525/12351
 sage: sage: sage: timeit('x.gcd(y)')
 625 loops, best of 3: 11.4 µs per loop
 age: sage: R.<t> = PolynomialRing(ZZ,implementation="NTL")
 sage: sage: x,y=t^2-1,t-1
 sage: sage: sage: timeit('x.gcd(y)')
 625 loops, best of 3: 17.8 µs per loop
 }}}

 With the patch:
 {{{
 sage: R.<t>=PolynomialRing(GF(3),implementation="NTL")
 sage: x,y=t^2-1,t-1
 sage: sage: timeit('x.gcd(y)')
 625 loops, best of 3: 32.7 µs per loop
 sage: x,y=234/234525,4324525/12351
 sage: sage: timeit('x.gcd(y)')
 625 loops, best of 3: 1.32 µs per loop
 sage: R.<t> = PolynomialRing(ZZ,implementation="NTL")
 sage: x,y=t^2-1,t-1
 sage: sage: timeit('x.gcd(y)')
 625 loops, best of 3: 17.3 µs per loop
 }}}

 Let's see what the patchbot thinks about it…

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