1. Graal in high-performance JavaGraalVM is named after the Graal compiler.
Graal is a universal compiler, that is, although it is a single implementation, it can be used for many purposes.
For example, we can use Graal to compile in advance and immediately, and we can also use it to compile many programming languages.
2. JavaJava with small memory occupation and fast startup speed is quite powerful for long-running processes, but short-running processes may encounter problems of long startup time and high memory occupation.
3. Combining JavaScript, Java, Ruby and R. In addition to Java, GraalVM also includes the implementation of JavaScript, Ruby, R and Python.
They are all developed using a language implementation framework called Truffle, which makes it possible to implement simple and high-performance language interpreters.
Graal is automatically used as a JIT compiler when developing a language interpreter with Truffle.
So Graal is not only a JIT compiler and precompiler for Java, but also a JIT compiler for JavaScript, Ruby, R language and Python.
4. Running native language GraalVM on JVM also supports C language, and GraalVM can run C code just like running JavaScript, Ruby and other languages.
In fact, GraalVM supports C language by running LLVM bit code, instead of running C code directly.
That is to say, we can use the existing tools together with C language, and we can also use other languages that can output LLVM, such as C++, Fortran and other languages that may appear in the future.
To simplify the demonstration, I used a single file version of gzip maintained by StephenMcCamant.
For simplicity, it just connects the gzip source code and the autoconf configuration into one file.
I still need to modify something to make it run on macOS, but it can't run on GraalVM.
5. Tools for all programming languages If you program in Java, you may be used to using high-quality tools, such as IDE, debugger and analyzer, but not all programming languages have such useful tools.
However, if you use a language in GraalVM, you can get such a tool.
6. Extending JVM-based applications can be used for independent language implementation and multilingual programming, and these languages and tools can also be embedded in Java applications.
The new org.graalvm.polyglotAPI can be used to load and run code in other languages.