Earlier quoted context omitted.
> And why doesn't python's default runtime environment come with JIT? I think they should absolutely go for it, ensure the default python you get when you run python has a JIT, given the huge user base of python. 1. because CPython aims to be relatively simple and straightforward by choice 2. because the "huge user base" comes in large parts from the deep and extensive C API, which is absolute hell on a JIT 3. becaus…
> because CPython aims to be relatively simple and straightforward by choice Sacrificing performance for core interpreter developer convenience may have been the right choice when Python was getting started; it's no longer the right choice today. Today it's short-sighted. > because the "huge user base" comes in large parts from the deep and extensive C API, which is absolute hell on a JIT We can have both a JIT and a…
Yes, but not that native API. Designing a native API that doesn't create huge problems later is difficult. The JVM, .NET and V8 guys managed it (mostly) but the scripting languages generally didn't. Their API is just literally the entire internals of the interpreter.
Figuring out how to JIT code in the presence of native extensions that expect the implementation to work in exactly the same way it always worked is a research problem. The only people who have got close to solving it are the GraalVM guys. They do it by virtualising the interpreter API and also JIT-compiling the C code! They run LLVM bitcode on the same engine that runs the scripting engine.