| ▲ | kccqzy 19 hours ago | |||||||
Python’s goal is never really to be fast. If that were its goal, it would’ve had a JIT long ago instead of toying with optimizing the interpreter. Guido prioritized code simplicity over speed. A lot of speed improvements including the JIT (PEP 744 – JIT Compilation) came about after he stepped down. | ||||||||
| ▲ | int_19h 11 hours ago | parent | next [-] | |||||||
I doubt it would have a JIT a long time ago. Thing is, people have been making JIT compilers for Python for a long time now, but the semantics of the language itself is such that it's often hard to benefit from it because most of the time isn't in the bytecode interpreter itself, it's dispatching things. People like comparing Python to JavaScript, but Python is much more flexible - all "primitive" types are objects can be subclassed for example, and even basic machinery like attribute lookups have a bunch of customization hooks. So the problem is basically that a simple JIT is not beneficial for Python. So you have to invest a lot of time and effort to get a few percent faster on a typical workload. Or you have to tighten up the language and/or break the C ABI, but then you break many existing popular libraries. | ||||||||
| ||||||||
| ▲ | davidkhess 18 hours ago | parent | prev | next [-] | |||||||
Should probably mention that Guido ended up on the team working on a pretty credible JIT effort. Though Microsoft subsequently threw a wrench in it with layoffs. Not sure the status now. | ||||||||
| ▲ | pjmlp 3 hours ago | parent | prev | next [-] | |||||||
He was part of the driving effort after joining Microsoft though. | ||||||||
| ▲ | IshKebab 16 hours ago | parent | prev | next [-] | |||||||
If performance was a goal... hell if it was even a consideration then the language would be very different. | ||||||||
| ▲ | mhh__ 13 hours ago | parent | prev [-] | |||||||
Python is full of decisions like this / or rather full of "if you just did some more work it'd be 10x better" | ||||||||