GraalVM, an Oracle Labs project providing a multi-language virtual machine, has added experimental support for Java on the Truffle framework, which derives high-performance code from interpreters and allows for efficient running of languages. The move elevates Java to the level of other languages on GraalVM and boosts Java performance.
Java on Truffle is introduced in GraalVM 21, which was published on January 19. GraalVM 21 has an installable component, called Espresso, that makes it possible to run Java code via a Java bytecode interpreter implemented with the Truffle framework. In addition to the bytecode interpreter, Java on Truffle provides other core components of a Java virtual machine including a single pass .class file parser, a simple object model, and a Java Native Interface (JNI) implementation. Java 8 and Java 11 are supported.
Prior to version 21, GraalVM ran Java via the HotSpot VM with the GraalVM JIT compiler or via compilation to a native executable via GraalVM Native Image.
GraalVM 21 Community and Enterprise editions can be downloaded from graalvm.org. Other new capabilities in GraalVM 21 include:
- Added Java serialization support for Native Image binaries.
String.prototype.replaceAll, and Logical Assignment Operators.
- The Ruby implementation now targets Ruby 2.7.2.
- For Python, the
jarraymodule has been added for compatibility with Jython, a Java implementation of Python.
- For the LLVM bitcode runtime, AST (abstract syntax tree) sharing has been improved and support introduced for auxiliary engine caching.
- The GraalWasm interpreter for WebAssembly gains better peak performance and faster warmup.
- As part of the GraalVM introduction, the GraalVM Extension Pack for Visual Studio Code has been introduced as a technology preview. It is available in the Visual Studio Code Marketplace.
Copyright © 2021 IDG Communications, Inc.