Pyhton Interpreter Startup time

Peter Hansen peter at engcorp.com
Thu Aug 12 09:01:30 EDT 2004


Neil Benn wrote:

>          I'm looking at a small app which would need a very quick 
> startup time for the Python interpreter.  It doesn't do much (copying 
> and caching of files, no GUI) but I need the Python interpreter to start 
> up very quickly (<1 second on a Windows box).  

What kind of machine do you have?

On mine, Python starts up in about 0.06 seconds...

This primitive test shows these results on a Windows XP machine
(it won't work with Windows 98 as it can't chain commands on the
command line like that, but you could but it in a batch file).

c:\>echo. | time & python -c "import time; print time.time()"
The current time is:  8:59:59.67
Enter the new time:
1092315599.73

This is a fairly fast machine (Athlon 2500+) but I really
doubt slower machines would take much longer than 1 second
unless they are *really* old.

-Peter



More information about the Python-list mailing list