3 ms·
How will the runtime system know to invalidate and recompile the code, if the alert check isn't being done on every call? At some level, the check for the aler
by Karellen 4y ago
How will the runtime system know to invalidate and recompile the code, if the alert check isn't being done on every call?
At some level, the check for the alert has to be done on every call. If it isn't being done, the one time there should be an alert it will be missed. If it is being done, where is it being done if not in the optimised JITted code, and how is that code even more optimised than the JITted version would be? Why not just put that optimisation in the JITted code?
- kjeetgill 4y agoThe terms you'll want to read up on are JIT speculation and deoptimisation. There's a whole range of things that can be done like trapping the null derefrence instead of an explicit check, once hot code is inlined the check could be lifted out several call frames outside of loops. Then you can ignore the check later. All sortsa stuff can happen.