Re:We've been lied to: JavaScript is fast
by pizlonator on Tuesday October 12, 2021 @08:58PM
(#28847001)
JSC limits recompilation only in the sense that we have exponential back off on each jettison. But that means that a sufficiently hot function will keep getting recompiled forever even if speculation is permabroken in that function.
Other than that JSC has only very weak heuristics for aging out code. And on sufficiently empowered devices our JIT pool is hundreds of megs.
So, we will happily compile your whole program with the jit if your whole program is warm and runs long enough.
I haven't really paid attention to V8's policies for years, but generally speaking, it still does this to some extent.
I think of SIPS as basically the resident set size for code. Depending on how the system ages your code, you might be stuck with unused JIT code until it can be recycled, if at all. V8 used to have code aging and the implementation was a huge bug farm. I am not sure if that survived the switch to TurboFan/Ignition. Of course, V8 GC's code about as aggressively as it compacts the old generation.