Hi there, this is a continuation of a thread on [sage-nt] on arithmetic over Z/nZ[x] for n word sized.
http://groups.google.com/group/sage-nt/browse_thread/thread/6e415c61089ea435 It started about #4965 http://trac.sagemath.org/sage_trac/ticket/4965 as a call for help because I can't seem to find the cause of a bug in my zmod_poly_t wrapper. The files that fail are: sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py sage/schemes/elliptic_curves/ell_number_field.py and details on the failure are given in the ticket. Later the thread moved on to discuss zn_poly and FLINT's zmod_poly_t. Craig asked how zmod_poly_t compares against zn_poly. I now added a function _mul_zn_poly to the zmod_poly_t wrapper which exploits that -- for no -- the internal formats of zn_poly and zmod_poly_t are very similar. The following is multiplication of two random polynomials over GF(140737488355328) of length n n FLINT zn_poly 512 0.000 0.001 1024 0.001 0.000 2048 0.002 0.002 4096 0.005 0.005 8192 0.011 0.012 16384 0.024 0.024 32768 0.051 0.053 65536 0.115 0.106 131072 0.292 0.220 262144 0.612 0.454 524288 1.522 1.028 1048576 3.136 2.096 Note, that the old Sage class is very slow compared to any of those implementations: == Old Sage ZZ_pX wrapper == sage: P.<x> = PolynomialRing(GF(7)) sage: type(x) <type 'sage.rings.polynomial.polynomial_modn_dense_ntl.Polynomial_dense_mod_p'> sage: f = P.random_element(100) sage: g = P.random_element(100) sage: %timeit f*g 1000 loops, best of 3: 445 µs per loop == New Sage FLINT wrapper == sage: P.<x> = PolynomialRing(GF(7)) sage: type(x) <type 'sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint'> sage: f = P.random_element(100) sage: g = P.random_element(100) sage: %timeit f*g 100000 loops, best of 3: 7.92 µs per loop However, since there are still doctest failures I can't figure out, the patch is just sitting on Trac (hint hint :)) Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://www.informatik.uni-bremen.de/~malb _jab: martinralbre...@jabber.ccc.de --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---