3 ms·
Any JIT needs an interpreter to run code sections that are not compiled (yet), and large sections (I don't have any statistics, but I would guess a very sizable
by w0utert 7y ago
Any JIT needs an interpreter to run code sections that are not compiled (yet), and large sections (I don't have any statistics, but I would guess a very sizable majority) of the code is 'cold' and will never get compiled at all. Compiling bytecode to machine code is a relatively expensive operation in itself so it only makes sense to do it for 'hot' sections (loops, functions that get called many times, etc).
- pjmlp 7y agoThere JIT implementations without interpreter phase, .NET being one of them.
- saagarjha 7y agoIt appears that Mono has added the interpreter back: https://www.mono-project.com/news/2017/11/13/mono-interpreter/ https://www.mono-project.com/news/2017/11/13/mono-interprete.... I think the CLR has one too, but I haven't looked into it much: https://github.com/dotnet/runtime/blob/master/src/coreclr/src/vm/interpreter.cpp https://github.com/dotnet/runtime/blob/master/src/coreclr/sr...