3 ms·
JIT compilation can be faster for compiled languages too, as it allows data driven inlining and devirtualization, as well as "effective constant" propogation an
by bencyoung 1y ago
JIT compilation can be faster for compiled languages too, as it allows data driven inlining and devirtualization, as well as "effective constant" propogation and runtime architecture feature detection
- varjag 1y agoIt can be but it never is.
- __s 1y agoEspecially after PGO (profiling guided optimization) gets most of the way there
- ignoramous 1y agoTo re-optimize compiled code blocks isn't without effort. Google has publicly spoken about AutoFDO and Propeller [0], after Meta had open sourced BOLT [1] in 2021. AutoFDO has since been ported to Android and adopted by Yandex [3]. [0] https://lwn.net/Articles/995397/ https://lwn.net/Articles/995397/ [1] https://news.ycombinator.com/item?id=40868224 https://news.ycombinator.com/item?id=40868224 [2] https://news.ycombinator.com/item?id=42896716 https://news.ycombinator.com/item?id=42896716
- Rohansi 1y agoBut is that because of JIT compilation or other decisions for how the language should work (dynamic typing, GC, etc.)?
- ranger_danger 1y agoHard disagree. Many newer game system emulators (32-bit and up) rely on JIT or "dynarecs" to get playable speeds, and they pretty much all use high performance compiled languages already. They often double the performance over their interpreter or more.
- duped 1y agoIs there a production JIT for a compiled language that is actually faster? I understand the theory, I don't think the practice backs it up.
- fragmede 1y agoDepends, what do you consider Java?
- varjag 1y agoJava is certainly not the fastest language out there.
- pcwalton 1y agoSure, but the relevant comparison isn't between languages: it's between a state-of-the-art JIT implementation of one language and a likewise-state-of-the-art AOT implementation of the same language. Unfortunately there aren't many examples of this; most languages have a preferred implementation strategy that receives much more effort than the other one.
- pcwalton 1y agoI believe HotSpot is usually faster than GCJ.