#10255: improve karatsuba multiplication of univariate polynomials
--------------------------------+-------------------------------------------
   Reporter:  lftabera          |       Owner:  AlexGhitza                      
     
       Type:  enhancement       |      Status:  new                             
     
   Priority:  major             |   Milestone:  sage-4.6.1                      
     
  Component:  basic arithmetic  |    Keywords:  karatsuba, multiplication, 
polynomial
     Author:                    |    Upstream:  N/A                             
     
   Reviewer:                    |      Merged:                                  
     
Work_issues:                    |  
--------------------------------+-------------------------------------------
 For univariate polynomials over exact rings, plain karatsuba is used.

 However, the degree in which karatsuba starts to be better than plain
 multiplication looks too high for me.

 Some optimization must be made.

 {{{
 sage: K=QQ[I][x]
 sage: f=K.random_element(1500)
 sage: g=K.random_element(1500)
 sage: %time _ = f._mul_generic(g)
 CPU times: user 6.03 s, sys: 0.08 s, total: 6.11 s
 Wall time: 6.43 s
 sage: %time _ = f._mul_karatsuba(g)
 CPU times: user 6.95 s, sys: 0.06 s, total: 7.01 s
 Wall time: 7.76 s
 }}}

 For instance, many time is used adding elements of the ring with python 0.
 Causing an overhead of up to 75% for some rings.

 With the added patch we can get up to gain of four times the speed.

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