3 ms·
Fully agree that it's a ton of work to build a production quality compiler. Graal is "new" only in the sense that it only recently got good enough for people t
by mike_hearn 10y ago
Fully agree that it's a ton of work to build a production quality compiler.
Graal is "new" only in the sense that it only recently got good enough for people to care about it. It's actually been in development for years ... arguably close to a decade now given that it traces its heritage back to the Maxine VM.
Graal's generated code quality is similar to HotSpot C2 i.e. the fastest available Java JITC, at least for most ordinary benchmarks (I have a feeling it may be weaker at auto-vectorisation than C2 but I'm not sure). Where Graal really spanks the competition is with more dynamic languages like Scala or Ruby though. There it sees huge speedups compared to other state of the art compilers.
Graal can also JIT/AOT compile LLVM bitcode. I don't know what performance is like for that, but earlier prototypes that JITd C ASTs directly could compile C with performance about 7% worse than GCC/clang (best of for each benchmark). The last 7% will take some work I guess but it's not infeasible.
There's a long term plan to make Graal the default JIT compiler in HotSpot. The problem at the moment is it - no surprise - it uses more memory than C2, and shares the same Java heap as the application.