Note that over allocating has a performance hit attached to it: sage: P = PolynomialRing(QQ,500,'x') sage: f = P.random_element() sage: R = PolynomialRing(QQ,1000,'x') sage: g = R(f)
sage: %timeit f*f 100000 loops, best of 3: 18.2 µs per loop sage: %timeit g*g 10000 loops, best of 3: 32.3 µs per loop Also, it does increases the memory requirements for each and every element. 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 an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org