News for hackers. Stuff that matters.
Re:How the CPython compiler works by r4victor on Thursday September 24, 2020 @08:45AM (#24578062)
I'm by no means an expert on JIT compilation, but I can give a less technical answer. I think the primary reason is that most of the developers (both CPython core developers and Python developers) do not consider Python as a tool for writing perfomance critical software. So, any JIT initiative, which requires a lot of resources, doesn't get enough of them. CPython allows to write C extension modules quite easily, so if you need to write some perfomance critical piece of code , you just switch to C and call a C function from Python.

Unladen Swallow was a version of CPython that added JIT support. PEP-3146 describes an unsuccessful attempt to merge it into CPython [1]. Here's a postmortem [2]

Starting with version 3.6, CPython allows to set a custom frame evaluation function on the interpreter and to store JIT compiled code in a code object. This was done to support JIT in a form of a separate module and is described in PEP 523 [3].

This is very interesting topic. I should study it in detail and probably write a post. I hope I'll be able to give a more thorough answer someday.

[1] https://www.python.org/dev/peps/pep-3146

[2] http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospect...

[3] https://www.python.org/dev/peps/pep-0523/

Re:How the CPython compiler works by tasubotadas on Thursday September 24, 2020 @11:36AM (#24579616)
Thanks. That's the answer I was looking for.