> For the ring of polynomials with coefficients over ZZ: > > ---------------------------------------------------------------------- > > | Sage Version 4.1, Release Date: 2009-07-09 | > | Type notebook() for the GUI, and license() for information. | > > ---------------------------------------------------------------------- > sage: K.<x> = ZZ["x"] > sage: f = 2*x^2 + 3*x + 1 > sage: %timeit power_mod(f, 10, 24) > 10000 loops, best of 3: 93.7 µs per loop
This is about 5x slower than the native way using FLINT's zmod_poly on my machine: sage: K.<x> = ZZ["x"] sage: f = 2*x^2 + 3*x + 1 sage: %timeit power_mod(f, 10, 24) 10000 loops, best of 3: 104 µs per loop sage: P.<x> = PolynomialRing(Zmod(24)) sage: f = 2*x^2 + 3*x + 1 sage: %timeit f**10 100000 loops, best of 3: 19.3 µs per loop Cheers, 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: [email protected] --~--~---------~--~----~------------~-------~--~----~ 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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
