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.
GraalVM is a set of tools. It's hard to cover in one reply... The big feature is it's probably the most advanced JIT optimizing compiler available outside of research. It can run _a lot_ of different languages too and it's cross platform by default. It will literally run on any device that can run a JVM, and even some that can't. It's also written in a language (Java) that's far more accessible for people to make compiler enhancements too, hence it's meteoric rise.
Another big feature is it's Native Image feature, which is an AOT compiler. You can make a native executable out of a Ruby, Java, JS, or Python program, with some asterisks. I think Quarkus' benchmarks really speak to why this feature is valuable (scroll down on this page) https://quarkus.io
8 comments
[ 0.24 ms ] story [ 29.3 ms ] threadhttps://gluonhq.com/create-native-javafx-applications-using-...
Their website docs suggest that you can build static libs that could be linked to an iOS app. But I haven't had time to try this.
https://www.codenameone.com
https://github.com/MobiVM/robovm
When should I use it?
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.
Another big feature is it's Native Image feature, which is an AOT compiler. You can make a native executable out of a Ruby, Java, JS, or Python program, with some asterisks. I think Quarkus' benchmarks really speak to why this feature is valuable (scroll down on this page) https://quarkus.io