Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Should I Rewrite the Python Launcher for Unix in Python? (snarky.ca)
4 points by ingve 48 days ago | hide | past | favorite | 1 comment


> If I give Rust an optimistic number by picking its average lower-bound and Python a handicap of picking its average upper-bound, we get:

> 3 ms for Rust (333 Hz)

> 33 ms for Python (30 Hz)

A big chunk of the Python time reported here is likely just starting up the runtime before any of the script can actually run.

For tools that only need the standard library, there is (depending on system config) some room to improve on this by passing `-S` to Python, which will disable running the standard library `site.py` at startup (used for parsing `.pth` files in the `site-packages` folder as well as running any custom local startup hooks).




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

Search: