Hacker News new | past | comments | ask | show | jobs | submit login

Is this worse than the standard python interpreter? Python startup time is a big reason I've moved a bunch of my personal utilities to Rust.





CPython startup is pretty fast assuming you aren't importing heavy modules. Of course, any nontrivial program needs to do some imports.

Some examples:

  0.01s cpython - with site disabled
  0.04s pypy - with site disabled
  0.04s cpython - import site and/or built-in modules
  0.08s pypy - import site and/or built-in modules
  0.13s cpython - import requests  
  0.31s pypy - import requests
  0.31s cpython - import IPython
  0.72s pypy - import IPython
  1.1s cpython - run ipython nop
  2.1s pypy - run ipython nop
(the last digit of all of these numbers often varies a little)

Since Python's startup is reasonably fast, it's possible to use it for interactive tools even with heavy imports by spawning a daemon the first time, and just forwarding the requests over a socket. This is mildly annoying but not particularly difficult.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: