#10532: Faster multiplication for multivariate power series
-----------------------------------+----------------------------------------
   Reporter:  niles                |       Owner:  malb                         
                     
       Type:  enhancement          |      Status:  needs_info                   
                     
   Priority:  major                |   Milestone:                               
                     
  Component:  commutative algebra  |    Keywords:  multivariate power series 
multiplication Karatsuba
     Author:  pernici              |    Upstream:  N/A                          
                     
   Reviewer:  Niles Johnson        |      Merged:                               
                     
Work_issues:                       |  
-----------------------------------+----------------------------------------

Comment(by pernici):

 niles wrote:
 >This looks *really good* -- but I'm a little confused by the comparison
  with `gp` . . . If that's always faster, should we just always do the
  multiplication there?  There must be more subtleties involved, but I
 don't
  know *anything* about them :(


 Well, I don't know either, I just looked at it today.
 I think that if one would like to use PARI, one should avoid `gp`
 as much as possible and call directly the PARI C library functions;
 in fact `gp` has a big overhead
 {{{
 sage: g = gp('1 + (x+y)*t + O(t^6)')
 sage: %timeit g^2
 25 loops, best of 3: 16 ms per loop
 sage: R.<x,y> = QQ[[]]
 sage: p = 1 + x + y + R.O(6)
 sage: %timeit p^2
 625 loops, best of 3: 56.5 µs per loop
 }}}
 so that it starts to be convenient to use it when the computation is long
 enough.

 For this reason
 in the benchmark in the previous mail `gp` is slower for small precision
 {{{
 N  prec  n   (0)    (2)    (3)
 2  10    1   0.02   0.01   0.02
 2  20    1   0.23   0.03   0.03
 }}}


 In the above benchmarks `gp` is at most 2.5x faster;
 in those cases the overhead is negligible, so I guess that using directly
 the PARI library the speedup would be the same.

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