4 ms·
> Heavily optimizing JITs are exactly what you don't want for cold code: time spent compiling is time you could have been spending running the code. I agree wi
by haberman 11y ago
> Heavily optimizing JITs are exactly what you don't want for cold code: time spent compiling is time you could have been spending running the code.
I agree with your overall point of cold cold performance being paramount. But I don't think this follows. A heavily optimizing JIT can have very good cold-code performance if the JIT is especially fast and/or it makes especially good decisions about when to JIT.
The important trait is short break-even time: how long after JIT-ting some code that you break even on the investment of JITting time.
When all I knew was the JVM I assumed that JIT-compiling inherently had a long warm-up / break-even time. Now that I've experienced LuaJIT I know this isn't true. I haven't benchmarked the major JIT-ting JS engines but they seem pretty good at this too?
- pcwalton 11y agoBy "a heavily optimizing JIT" I mean "the specific mode of a larger JIT-enabled engine that compiles slowly but emits good code". So IonMonkey, Crankshaft, SpeculativeJIT/FTL are all JITs that live inside a larger engine that switches between them as needed. In JS land we usually call the individual modes "JITs" even though they may (or may not) share a bunch of code.