Hi again, I've applied the patch David was referring to and these are the timing results. Please note that I increased the for loop by a factor of 10.
# Malloc sage: time test_mpz_add_init() CPU times: user 2.13 s, sys: 0.01 s, total: 2.14 s sage: time test_sage_add() CPU times: user 9.82 s, sys: 0.03 s, total: 9.85 s # PyMem_Malloc sage: sage.rings.integer.pmem_malloc() sage: time test_mpz_add_init() CPU times: user 2.71 s, sys: 0.02 s, total: 2.74 s sage: time test_sage_add() CPU times: user 9.87 s, sys: 0.02 s, total: 9.89 s sage: time test_sage_add_big() CPU times: user 10.01 s, sys: 0.03 s, total: 10.04 s # omalloc sage: omalloc_malloc() sage: time test_mpz_add_init() CPU times: user 1.46 s, sys: 0.00 s, total: 1.46 s sage: time test_sage_add() CPU times: user 8.12 s, sys: 0.01 s, total: 8.13 s sage: time test_sage_add_big() CPU times: user 8.77 s, sys: 0.01 s, total: 8.78 s It looks like if a significant speed gain can be be accomplished for integer addition by using omalloc. Thoughts? Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _icq: 177334829 _jab: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---