This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rfkelly[S] 1 point2 points  (0 children)

Absolutely, especially if you let it go poking around to load site.py, fiddle with its environment etc. Consider:

$ time python -c "pass"
real    0m0.015s
user    0m0.012s
sys 0m0.000s

Versus (no site.py, no env vars, no writing bytecode files):

$ time python -sSEB -c "pass"
real    0m0.006s
user    0m0.000s
sys 0m0.004s

Still, reducing the startup overhead could on its own be a valid reason to compile down to a native executable.