On the Virtues of Generic Programming for Symbolic Computation

The purpose of this study is to measure the impact of C level code polynomial arithmetic on the performances of AXIOM high-level algorithms, such as polynomial factorization. More precisely, given a high-level AXIOM package P parametrized by a univariate polynomial domain U , we have compared the performances of P when applied to different U 's, including an AXIOM wrapper for our C level code. Our experiments show that when P relies on U for its univariate polynomial computations, our specialized C level code can provide a significant speed-up. For instance, the improved implementation of square-free factorization in AXIOM is 7 times faster than the one in Maple and very close to the one in MAGMA . On the contrary, when P does not rely much on the operations of U and implements its private univariate polynomial operation, then P cannot benefit from our highly optimized C level code. Consequently, code which is poorly generic reduces the speed-up opportunities when applied to highly efficient and specialized

[1]  Joris van der Hoeven The truncated fourier transform and applications , 2004, ISSAC '04.

[2]  Marc Moreno Maza,et al.  Efficient Implementation of Polynomial Arithmetic in a Multiple-Level Programming Environment , 2006, ICMS.

[3]  Andrés Iglesias,et al.  Mathematical Software - ICMS 2006, Second International Congress on Mathematical Software, Castro Urdiales, Spain, September 1-3, 2006, Proceedings , 2006, ICMS.

[4]  Marc Moreno Maza,et al.  Implementation techniques for fast polynomial arithmetic in a high-level programming environment , 2006, ISSAC '06.

[5]  Richard D. Jenks,et al.  AXIOM: the scientific computation system , 1992 .

[6]  John J. Cannon,et al.  Programming with algebraic structures: design of the MAGMA language , 1994, ISSAC '94.

[7]  Tommy Färnqvist Number Theory Meets Cache Locality – Efficient Implementation of a Small Prime FFT for the GNU Multiple Precision Arithmetic Library , 2005 .

[8]  Victor Shoup,et al.  A New Polynomial Factorization Algorithm and its Implementation , 1995, J. Symb. Comput..

[9]  P. L. Montgomery Modular multiplication without trial division , 1985 .

[10]  Stephen M. Watt,et al.  A first report on the A# compiler , 1994, ISSAC '94.

[11]  Lionel Ducos Optimizations of the subresultant algorithm , 2000 .

[12]  Guillaume Hanrot,et al.  The Middle Product Algorithm I , 2004, Applicable Algebra in Engineering, Communication and Computing.

[13]  Joachim von zur Gathen,et al.  Modern Computer Algebra , 1998 .