On 7/28/07, Jonathan Bober <[EMAIL PROTECTED]> wrote: > I've been working on a from-scratch implementation (attached). Right now > it runs a faster than Ralf Stephan's part.c, but not as fast as we would > like. (And it seems to work, although I can't guarantee that right > now.)
Jonathan, I've now included your code in SAGE (for 2.7.2) and made it available (not by default) so it can be used as follows: sage: time v=number_of_partitions(10^7, algorithm='bobber') CPU times: user 0.86 s, sys: 0.00 s, total: 0.87 s Wall time: 1.21 Your code agrees with Mathematica for 10^7 and 10^8, by the way: sage: s=mathematica.eval('PartitionsP[10^7]') sage: s = ''.join(s.replace('>','').split()) sage: s == str(v) True sage: time s=mathematica.eval('PartitionsP[10^8]') CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 13.89 sage: time v=number_of_partitions(10^8, algorithm='bobber') CPU times: user 11.94 s, sys: 0.10 s, total: 12.04 s Wall time: 16.44 sage: s = ''.join(s.replace('>','').split()) sage: s == str(v) True I want to release sage-2.7.2 soon, so please let me know if including part.cc with it is OK. -- William --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---