You don't have to throw away the original Python codebase.
You can have:
1. An implementation in slow language (i. e. Python) that you maintain manually or semi-manually (with minimal AI assistance) and understand well.
2. A fast implementation that is fully generated and maintained by AI, using slow implementation (1) as a reference.
You can, for example, run two "adversarial" agents, one writes tests that compare output of (1) and (2) and tries to find a discrepancy, the other tries to fix (2) so that its output never differs from (1).
This way, you can be reasonably confident that (2) does exactly the same thing as (1), despite being a blackbox that you don't understand. While (1) remains a reference implementation that you understand well and can work with.
The problem is that Python just isn't going to go fast. There are some languages that may have had more resources poured into them to make them go faster in absolute terms, like perhaps Java. But I don't think there's a single language that has had so many ways of trying to make it go faster given so much effort over so many decades. It's really time to call it... if you have Python code and it's a performance problem, if one of the many many many different solutions aren't adequate for some reason, Python is not going to get any faster than it is today and you're going to have to move off of it.
If you need high performance code, Python is simply not the right answer and you're going to have to skill up. Or accept what you have, which you'll have to decide if that's a viable option. If it's fast enough I don't advocate switching casually. But if it isn't, there isn't a realistic prospect that you're going to wake up in a year or two to a 30x-faster Python. I wasn't terribly convinced by that claim back in the early 2000s, but it hadn't really been tested yet. It has been tested now.
> RustPython is in development, and while the interpreter certainly can be used in interesting use cases like running Python in WASM and embedding into a Rust project, do note that RustPython is not totally production-ready.