5 ms·
I was hoping to see an AOT - but they say that currently it is just interpreter + JIT. This is beneficial for compatibility but counterproductive for speed. Nev
by garganzol 3y ago
I was hoping to see an AOT - but they say that currently it is just interpreter + JIT. This is beneficial for compatibility but counterproductive for speed. Nevertheless, an interesting project.
- circuit10 3y agoThere is TeaVM though which is AOT https://github.com/konsoletyper/teavm https://github.com/konsoletyper/teavm
- jsiepkes 3y agoGoogle's J2CL (successor to GWT) is also AOT. https://github.com/google/j2cl https://github.com/google/j2cl
- sdeleuze 3y agoJ2CL sadly uses Java sources as the input, not JVM bytecode, which makes it hardly usable for a lot of use cases involving existing libraries.
- sdeleuze 3y agoAnd Bytecoder which targets Wasm GC. https://github.com/mirkosertic/Bytecoder https://github.com/mirkosertic/Bytecoder
- pulse7 3y agoIn article they explain, that previous version (CheerpJ 2.0) used AOT, but "CI setup was often felt as an unwelcome burden, and many of enterprise users found it hard to run the actual AOT compiler binaries on their controlled environments". So they decided to go to interpreter + JIT instead of AOT...
- CJefferson 3y agoDo any of the native AOT implementations outperform the best JITs? I remember trying bcc’s Java compiler years ago, and it was significantly slower than standard JITted Java, but maybe better systems exist.
- bheadmaster 3y agoConsidering the time-limit of JIT compilation, I'd say almost certainly yes. AOT can analyze code basically forever (ask C++ compilers), so there's a whole class of time-intensive optimizations that JIT simply cannot do. I'd personally always bet on AOT performance to beat JIT - to convince me otherwise is what I would require evidence for.
- apignotti 3y agoThe tradeoffs are more subtle. A JIT compiler has more timing constraint, but more information about the runtime behavior of code. As a counter-point to your argument, consider a highly dynamic language such as JavaScript, in particular the '+' operator. An AOT compiler would have no choice but dispatch to a generic heavy implementation that could handle any possible combination of inputs. On the other hand a JIT compiler can observe the runtime values used and specialize using Inline Caches, potentially down to just a few instructions.
- kaba0 3y agoGraalVM native compiled binaries rarely beat out their JIT compiled counterparts - is that enough evidence? The time spent optimizing is more than enough when you can focus the resources for the actually relevant parts.