3 ms·
Use GraalVM in these situations: 1. You want to compile programs to standalone native binaries that start ~instantly due to a pre-cached heap combined with pre
by origin_path 4y ago
Use GraalVM in these situations:
1. You want to compile programs to standalone native binaries that start ~instantly due to a pre-cached heap combined with pre-compiled code. Memory usage can be 10x lower than when running on a VM, at a cost of lower peak runtime performance than a HotSpot JVM and less app compatibility. Unless you use their Enterprise Edition in which case you can get the same peak runtime performance. NB: You can also compile code to C libraries this way.
2. You want to run programs written in a mix of languages, with every language running at high JIT-style speeds, and which interoperate at a high level e.g. you can exchange time and date types with the mappings between them being language natural. GraalVM can run languages like Ruby, Python, JavaScript, R and also pseudo-languages like LLVM bitcode, all at the same time and all on the same JVM with a shared GC heap and compiler.
3. Combining the two, use it if you want to make a JITC engine for a language that starts as fast as V8, and runs code as fast as V8, but you have 1% of the budget of the V8 team.
4. They also have sandboxing.
5. Or finally, use the GraalVM EE (commercially licensed) if you just want a JVM that runs code faster than HotSpot. It comes with a more advanced compiler. You can download EE for free to try it out and see how much it helps your app.