3 ms·
Either you can interpret the external native library as well, if you have the source code, or you can leave the calls to that library as normal native calls gen
by chrisseaton 10y ago
Either you can interpret the external native library as well, if you have the source code, or you can leave the calls to that library as normal native calls generated by the JIT.
So yes, that'll be an optimisation barrier, but it's the same barrier as you would already have if you were using an interpreter for Python making native calls to the same library. So it won't be any slower than our current best case.
(In fact the JIT can do some clever things to make the native call more efficient than in general, as it can do things like schedule values to be in the correct registers from the start rather than copying them in place just for the call, but that's probably not a significant source of inefficiency anyway).
- __s 10y agoWhat of JITing x86 assembly into x86?
- johncolanduoni 10y agoThis is basically how QEMU works when it's not using KVM
- chrisseaton 10y agoYes that's another option. We already do that for inline assembly in C programs.