On Nov 30, 2006, at 10:34 PM, William Stein wrote:
>> It's really incredible that MAGMA goes faster than python ints here. >> From memory, at sage days 2, our Integer stuff was still a factor of >> 7-10 away from python ints, at least for addition. > > I don't know what benchmark you were doing exactly, but now that > the dust > has > settled here's what you actually accomplished for addition, which > is better > than a factor of 7-10: http://modular.math.washington.edu:8101/ > benches2 > > {{{ > def b_python(a,b): > a=int(a) > b=int(b) > t=cputime() > for i in range(int(10^6)): > c = a+b > return cputime(t) > }}} You need to try this last one again in pyrex, using a cdef int i for the loop counter, and doing the arithmetic with python ints; and then compare that to the same thing using SAGE Integers. David --~--~---------~--~----~------------~-------~--~----~ 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-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
