On Jul 31, 2007, at 18:36 , William Stein wrote:
> > Hi, > > Just to extend this thread some more, a few remarks. While we're extending this, here's my $0.02 canadian (:-}) > On sage.math: > SAGE: > sage: time n = number_of_partitions(10^7) > CPU times: user 0.73 s, sys: 0.00 s, total: 0.73 s > Wall time: 0.73 > sage: time n = number_of_partitions(10^8) > CPU times: user 8.42 s, sys: 0.00 s, total: 8.42 s > Wall time: 8.42 > sage: time n = number_of_partitions(10^9) > CPU times: user 105.82 s, sys: 0.00 s, total: 105.82 s > Wall time: 105.81 > > Mathematica: > sage: time s=mathematica.eval('PartitionsP[10^7]') > CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s > Wall time: 1.90 > sage: time s=mathematica.eval('PartitionsP[10^8]') > CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s > Wall time: 9.91 > sage: time s=mathematica.eval('PartitionsP[10^9]') > CPU times: user 0.03 s, sys: 0.01 s, total: 0.04 s > Wall time: 70.43 > > Interesting, SAGE seems better at Mathematica for > smaller input.) > > > On my OS X core 2 duo 2.33Ghz laptop: > > SAGE: > sage: time n=number_of_partitions(10^7) > CPU times: user 0.62 s, sys: 0.00 s, total: 0.62 s > Wall time: 0.62 > sage: time n=number_of_partitions(10^8) > CPU times: user 6.99 s, sys: 0.02 s, total: 7.00 s > Wall time: 7.03 > sage: time n=number_of_partitions(10^9) > CPU times: user 94.71 s, sys: 0.28 s, total: 94.99 s > Wall time: 95.56 > > MATHEMATICA: > sage: time s=mathematica.eval('PartitionsP[10^7]') > CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s > Wall time: 8.65 > sage: time s=mathematica.eval('PartitionsP[10^8]') > CPU times: user 0.01 s, sys: 0.00 s, total: 0.01 s > Wall time: 48.08 > sage: time s=mathematica.eval('PartitionsP[10^9]') > CPU times: user 0.04 s, sys: 0.00 s, total: 0.05 s > Wall time: 350.30 > > Yep -- Mathematica 5.2 interestingly totally sucks at > computing the number of partitions on an Intel OSX > machine... and SAGE rocks. Checking partition count computation: On a Core 2 Duo 2.33 Mhz, computing the number of partitions of 10^9: Mathematica 5.2 (PartitionsP[10^9]: 95.5115 s Sage 2.7.2.1 (number_of_partitions(10^9): 125.2 s Jon Bober's code (i386: 'jb 1000000000'): 160 s I wonder why our Core 2 Duo timings are so different? All of the executables are "i386" binaries (32-bit x86). One oddity: Jon Bober's code produced a value ending in '30457526857797923685688339', while Mathematica and SAGE produced one ending in '30457526831036667979062760', so they differ. Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds ----------- If it weren't for carbon-14, I wouldn't date at all. ----------- --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---