Execution of JVM-based programs uses bytecode loading and interpretation, just-in-time compilation, and monolithic heaps causes JVM-based programs to start-up slowly with a high memory footprint. In recent years, different projects were developed to address these issues:
ahead-of-time compilation for the JVM (JEP 295) improves on JVM startup time while Scala Native and Kotlin/Native provide language-specific solutions by compiling code with LLVM and providing language-specific runtimes.
Now Polyglot Native is presented an ahead-of-time compiler for Java bytecode combined with a low-footprint VM. With Polyglot Native, programs written in Kotlin, Scala, and other JVM-based languages have minimal startup time as they are compiled to native executables. Footprint of compiled programs is minimized by using a chunked heap and reducingnecessary program metadata.
In this talk, you will see:
- the architecture of Polyglot Native and compare it to existing projects.
- live-demo of a project that compiles code from Kotlin, Scala, Java, and C into a single binary executable.
- intricacies of interoperability between Polyglot Native and C.