> How difficult it would be to transpile python program into a more performant language using a LLM ?
It'd be a lot easier (and more reliable) just to use a traditional compiler, rather than an LLM imitating a compiler.
The problem is maintaining the full scope of Python semantics there is usually no advantage to this. Compiling parts of a python codebase, with restricted semantics, can give you significant gains in some use cases, and there are tools (in Python!) that do that already.
I think the idea is that a person can read a project in python and re-implement it more efficiently in C++. The LLM could do the same thing. However, I don't think LLMs are quite that powerful.
It'd be a lot easier (and more reliable) just to use a traditional compiler, rather than an LLM imitating a compiler.
The problem is maintaining the full scope of Python semantics there is usually no advantage to this. Compiling parts of a python codebase, with restricted semantics, can give you significant gains in some use cases, and there are tools (in Python!) that do that already.