Hi William, On Wed, Mar 03, 2010 at 05:48:28AM -0800, William Stein wrote: > On Tue, Mar 2, 2010 at 7:56 PM, Dr. David Kirkby > <david.kir...@onetel.net> wrote: > >> Right now it takes over 1.5 seconds every time. > >> wst...@sage:~$ time sage -c "print factor(2010)" > >> 2 * 3 * 5 * 67 > >> real 0m1.535s > >> user 0m1.140s > >> sys 0m0.460s > > > > Personaly I don't find that too excessive for a large tool. How long does > > Gimp take to start? > > That's irrelevant. What matters is how long Maple, Mathematica, > Matlab, Maxima, Pari, and Magma take to start. > After repeatedly running the command on sage.math, this is how things > stabilize:
I'm not sure your benchmark correctly reflect what happens. Here are three consecutive launches on a relatively fast idle machine: tomahawk-~ $ time sage -c "print factor(2010)" 2 * 3 * 5 * 67 sage -c "print factor(2010)" 2,32s user 1,00s system 14% cpu 22,943 total tomahawk-~ $ time sage -c "print factor(2010)" 2 * 3 * 5 * 67 sage -c "print factor(2010)" 1,34s user 0,34s system 101% cpu 1,648 total tomahawk-~ $ time sage -c "print factor(2010)" 2 * 3 * 5 * 67 sage -c "print factor(2010)" 1,33s user 0,32s system 97% cpu 1,686 total The difference is enormous: more than one order of magnitude. IMHO the main problem is that at startup sage must access a *lot* of files and that access disk is the bottleneck. Once all those file are in the buffer/cache, the speed is completely different. I'm always surprised that they are many thing that I won't ever use that are imported at the top level of sage. Shouldn't we clean up what is imported and what is not imported by default and make it easy to import bunch of thing. For example, Many people certainly don't care about many stuff in combinatorics. Shouldn't we import by default very basic thing (permutations and cartesian_product) and let the user who is interested in combinatorics write the from sage.combinat import * ? My 2 cents, which has probably already been discussed before... Cheers, Florent -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org