Well, it seems to be the version-printing.  Using 

    subprocess.call([sys.executable, "-c", "pass"])

or "print 42" or other simple commands pypy seems
faster up to 2 times. Not sure care is needed for
speed of --version :)

cheers,
holger

On Thu, Nov 25, 2010 at 20:02 +0100, holger krekel wrote:
> using the following script:
> 
>     import sys, subprocess
> 
>     for i in range(1000):
>         subprocess.call([sys.executable, "--version"])
> 
> i get these results repeatedly:
> 
> (0)h...@teta:~/p/pytest$ time python2.7 r.py 2>/dev/null >/dev/null
> real    0m1.885s
> user    0m0.110s
> sys     0m0.480s
> 
> (0)h...@teta:~/p/pytest$ time pypy r.py 2>/dev/null >/dev/null
> real    0m8.763s
> user    0m1.730s
> sys     0m2.880s
> 
> IOW, pypy seems to be consistently 5-6 times slower on startup.
> Does anybody have explanations why?   When we did measurements
> for the Nokia Maemo device pypy was actually much faster IIRC.
> 
> holger
> _______________________________________________
> [email protected]
> http://codespeak.net/mailman/listinfo/pypy-dev
> 

-- 
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to