|
|
|
|
|
by MaxBarraclough
3149 days ago
|
|
Mixed-mode execution (interpreter+JIT when justified) isn't the only way to go. .Net doesn't work that way, for instance. Unlike Java's HotSpot, .Net never interprets CIL instructions. They're always compiled down to native code for execution. At least, that was true in 2009, according to Jon Skeet - https://stackoverflow.com/a/1255832/2307853 |
|
I wasn't aware of this. To be clear, it's not 100% accurate to say "never", because it depends on the .NET environment, but point taken.
I now understand that .NET (on desktop, anyway) compiles all intermediate code (CIL) to native code on every run. This is a way different kind of JIT than Java HotSpot, which executes intermediate code (bytecode) initially, profiles intermediate code execution, and only compiles the hot spots to native code after a while.
It seems like what "JIT" means has evolved since the time it meant "JVM HotSpot".
There's a very interesting snippet of an interview with Anders Hejlsberg at https://stackoverflow.com/a/1255828/4158187, which exposes his reasoning.