3 ms·
The horrible startup time is probably part of it: $ time ipython3 -c 'pass' real 0m1.083s user 0m0.355s sys 0m0.093s
by o11c 2y ago
The horrible startup time is probably part of it:
$ time ipython3 -c 'pass'
real 0m1.083s
user 0m0.355s
sys 0m0.093s
- Macha 2y agoIs 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.
- o11c 2y agoCPython 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.