4 ms·
Those are some very large qualifications, though, right? I think a better way of saying this is something like “you actually have to work quite hard to write na
by chriskrycho 5y ago
Those are some very large qualifications, though, right? I think a better way of saying this is something like “you actually have to work quite hard to write native code that outperforms an equivalent Java/Kotlin/Scala implementation for a specific kind of long-running process which can amortize the startup costs and the JIT time.” And that can be true! (Though in my experience naïve Rust often substantially outperforms naïve Java/C#/etc.)
The other thing is that true warmup (not just startup) time to reaching optimization is a lot weirder and less predictable than people realize. See e.g. [1] and [2] for a fascinating analysis (caveat: about a decade old) of the actual warmup characteristics of a number of different VMs (Graal, HHVM, HotSpot, LuaJIT, PyPy, TruffleRuby, and V8). Spoilers: there are bizarre deopt cliffs, scenarios where it appears to optimize and then de-optimizes if you run it long enough, and programs which just never optimize… and this is on benchmark tests!
[1]: https://tratt.net/laurie/blog/entries/why_arent_more_users_more_happy_with_our_vms_part_1.html https://tratt.net/laurie/blog/entries/why_arent_more_users_m...
[2]: https://tratt.net/laurie/blog/entries/why_arent_more_users_more_happy_with_our_vms_part_2.html https://tratt.net/laurie/blog/entries/why_arent_more_users_m...
- thinkharderdev 5y agoThat's a fair point. But I think that "long-running processes which can amortize the startup cost and JIT time" covers a very large swath of software development.