3 ms·
That's nothing. Armin Ronacher was complaining somewhere about the performance hit from static typing in python and i never though about that before. It'd be be
by tomwojcik 6y ago
That's nothing. Armin Ronacher was complaining somewhere about the performance hit from static typing in python and i never though about that before. It'd be best if all of that was removed in prod build along with unused imports, kind of what TypeScript does.
- ublaze 6y agoimports can't be safely automatically stripped in Python (or even 100% safely re-ordered) since they could have side effects. We run a linter that confirms with the user before stripping them, which works out well in practice.
- aitchnyu 6y agoIts apparently true for RPython too, where side effects which cause "methods and other class attributes do not change after startup".
- aaronbwebber 6y agolike PEP484 type annotations having a runtime performance hit? I would be very interested in seeing a link to this if you can dig it up.
- orf 6y agoThere used to be a performance hit because the annotation objects where all instantiated and attached to the function objects. This is no longer the case - they are only instantiated when inspected.