3 ms·
Python doesn't store the entire AST at runtime. You can hook into the import process and modify code before it's compiled to bytecode. You can modify the byteco
by DasIch 11y ago
Python doesn't store the entire AST at runtime. You can hook into the import process and modify code before it's compiled to bytecode. You can modify the bytecode at runtime but not any that's on the stack.
Python is also not all that slow, CPython is slow-ish but it's has effectively no optimizations at all. PyPy which has decent optimizations is actually fairly fast and getting faster with every release.
- Alphasite_ 11y agoZipPy is damn fast from what I've seen.
- stray 11y agoIsn't startup time painful though?
- Alphasite_ 11y agoProbably, but if pure runtime performance is a concern it should not be a huge issue and I imagine nail gin or something similar would help.