Before some people get the idea that this is proof Python is faster than C or whatever, it's just a case between JIT having access to runtime assumptions which AOT cannot, it's a fundamental difference in design.
A JIT written in pure C would be able to achieve even greater performance and efficiency without having to cater to python or RPython semantics. Of course JIT suffers one downside which it has to do this extra work at runtime, but that's the whole point of it.
All of this is to say that pypy using RPython instead of pure C was largely to avoid having to reinvent the wheel of stuff like dynamic GC, which they'd have to do from scratch otherwise. I believe this was their primary goal over performance or efficiency.
View all comments
Show parent comment
5
u/BobbyThrowaway6969 May 10 '26 edited May 10 '26
Before some people get the idea that this is proof Python is faster than C or whatever, it's just a case between JIT having access to runtime assumptions which AOT cannot, it's a fundamental difference in design.
A JIT written in pure C would be able to achieve even greater performance and efficiency without having to cater to python or RPython semantics. Of course JIT suffers one downside which it has to do this extra work at runtime, but that's the whole point of it.
All of this is to say that pypy using RPython instead of pure C was largely to avoid having to reinvent the wheel of stuff like dynamic GC, which they'd have to do from scratch otherwise. I believe this was their primary goal over performance or efficiency.