Is it possible to modify the Python interpreter to generate machine code and run directly on the processor?

I understand your observation, and I reiterate my strong determination to develop a compiler and integrate it into Python. I am committed to this challenge, as I see it as a significant opportunity to enhance performance and delve deeply into the intricacies of programming language implementation. This is a project that motivates me, and I am eager to tackle the challenges that will arise along this development path.

That is a noble goal, but taking on such a colossal project by yourself is a recipe for burning out and giving up. I’d recommend familiarizing yourself with the existing CPython codebase and trying to help with the existing open issues first. That is the path to learning the scope of the larger goal you have set out for yourself, and will build up the relationships and experience you’ll need to integrate something so large into the main version of Python.

4 Likes

I would need a huge team, but no one helps. So I’m going to close this here before more people arrive to respond. :skull_and_crossbones: I’ll learn but then I’ll come back.

Yes! That’s it. I see its still active, cool!

Numba seems relevant here.

1 Like

Just noting that all the aforementioned compilers can only compile a subset of the Python programming language or are not a drop-in replacement for CPython.

It is therefore a very strange idea to create a compiler just for this.