Re:How the CPython compiler works
by CJefferson on Thursday September 24, 2020 @08:31AM
(#24577955)
The biggest problem is that most nontrivial C programs use extensions written in C, and those extensions are written with fairly deep knowledge of CPython, so your JIT has to build most of the same structures as CPython anyway, in case an extension needs them.
[ Parent
| on HN ]
Re:How the CPython compiler works
by chrisseaton on Thursday September 24, 2020 @10:20AM
(#24578843)
In the Ruby JIT I work on what we did was write a C interpreter, and run the C extensions inside the same VM as the Ruby code. That allows you to provide the illusion of using the same structures, but actually allowing you to implement them however you want for better performance.
Re:How the CPython compiler works
by tasubotadas on Thursday September 24, 2020 @11:38AM
(#24579643)
IMO, that's a very interesting and smart approach :)
Re:How the CPython compiler works
by tasubotadas on Thursday September 24, 2020 @11:37AM
(#24579621)
Thanks. That's the answer I was looking for.