Aug. 9, 2002
3:01 p.m.
I remember doing some similar testing probably around the Python 2.0 timeframe and found a huge speed up by avoiding the import of site.py for largely the same reasons (avoiding tons of stat calls). It's not always practical to avoid loading site.py, but if you can, you can get a big startup win.
It's also easy: "python -S" avoids loading site.py. --Guido van Rossum (home page: http://www.python.org/~guido/)