On 7/24/07, Jack Schmidt <[EMAIL PROTECTED]> wrote: > > GAP takes under a second to compute Bell(1000), compared to over a > minute (and going) for maple on the same computer.
Gap takes about 1 second for this on one of my test machines. Nick Alexander wrote an optimized native SAGE function that computes *all* bell numbers up to n very quickly, much more quickly than Gap computes even one! sage: time v=expnums(1001,1) # this computes *all* Bell numbers up to Bell(1000) CPU times: user 0.12 s, sys: 0.00 s, total: 0.12 s Wall time: 0.13 sage: v[1000] == bell_number(1000) # uses GAP; about a second True sage: v[990] == bell_number(990) True sage: time v=expnums(2000,1) CPU times: user 1.36 s, sys: 0.04 s, total: 1.40 s Wall time: 2.35 > On Jul 24, 3:32 pm, "Alec Mihailovs" <[EMAIL PROTECTED]> wrote: > > May I suggest to add timing to the examples in the documentation - that > > would be very useful. That's an interesting idea. I don't know where I would add the information, which machine I would compute it on, etc., but I'll figure out something. This is a good idea. It would also be useful for regression testing, e.g., if something slows down a lot that's a warning sign. -- William > > For example, in recent discussion about Bell numbers on the math-fun list, > > it was noted that it takes a very long time to calculate bell(1000) in Maple > > while BellB[1000] in Mathematica is much faster. I get In[2]:= BellB[1000] Out[2]= BellB[1000] How do you compute BellB in Mathematica? -- William -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---