Tuesday, December 25, 2007

Some timings of startups

I did some tests (I always start the program and then immediatelly hit ctrl-D):

$ time ipython
[...]

real 0m0.305s
user 0m0.112s
sys 0m0.024s

$ time bin/isympy
[...]

real 0m0.535s
user 0m0.200s
sys 0m0.040s

$ time ./sage
[...]

real 0m1.398s
user 0m0.916s
sys 0m0.208s

I did that repeatedly, so this is the usual time I get on my laptop. I think ipython is quite slow, because:

In [1]: %time import sympy
CPU times: user 0.08 s, sys: 0.01 s, total: 0.09 s
Wall time: 0.09

or if I import it in the python interpreter, it's immediate.

The 0.3s is acceptable, 0.5s is quite a lot for me, and 1.4s is a lot. I am maybe too demanding, but it just annoys me to wait for 1.4s on the import time. I just get some idea to try, so I fire up Sage or SymPy and try it. I don't want to wait for 1.4s.

This can be fixed, one just needs to find modules that slow things down, and late import them, or just fix them in some way. And usually, one does it several times -- I think Sage did that twice, SymPy also I think did that twice already.

No comments: