#11684: Obtaining coefficients of polynomials over finite fields is extremely 
slow
---------------------------+------------------------------------------------
   Reporter:  johanbosman  |          Owner:  tbd                       
       Type:  defect       |         Status:  new                       
   Priority:  major        |      Milestone:  sage-4.7.2                
  Component:  performance  |       Keywords:  polynomials, finite fields
Work_issues:               |       Upstream:  N/A                       
   Reviewer:               |         Author:                            
     Merged:               |   Dependencies:                            
---------------------------+------------------------------------------------
 If we have a polynomial over a finite field and we want to obtain its
 coefficients, then there seems to be a lot of conversion overhead.  It is
 a lot slower than multiplying such polynomials:
 {{{
 sage: K.<a> = GF(5^3)
 sage: P = PolynomialRing(K, 'x')
 sage: f = P.random_element(100)
 sage: timeit('f.list()')
 5 loops, best of 3: 115 ms per loop
 sage: timeit('f * f')
 625 loops, best of 3: 794 µs per loop
 }}}

 If, on the other hand, we do not use NTL, then we can obtain the
 coefficient list without any delays, though in that case multiplication is
 a lot slower:
 {{{
 sage: P = PolynomialRing(K, 'x', implementation='not NTL')
 sage: f = P(f)
 sage: timeit('f.list()')
 625 loops, best of 3: 968 ns per loop
 sage: timeit('f * f')
 25 loops, best of 3: 12.3 ms per loop
 }}}
 This performance issue occurs in both 4.7 and 4.7.1.rc1.

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