GraalVM is a universal virtual machine that allows users to write polyglot applications using multiple languages like Java, JavaScript, Python, and Ruby. It includes just-in-time (JIT) and ahead-of-time (AOT) compilation capabilities. AOT compilation with GraalVM's Native Image feature can generate native executables from Java and other languages that have lower memory usage and faster startup times than JIT.
3. GraalVM What is is
Evgeny Hanikbloom @CommIt | 2022
GraalVM is a universal virtual machine for running
applications written in JavaScript, Python, Ruby, R, JVM-
based languages like Java, Scala, Groovy, Kotlin, Clojure,
and LLVM-based languages such as C and C++.
10. GraalVM What is is
Evgeny Hanikbloom @CommIt | 2022
• Drop-in replacement for Java 8 and Java 11, Java
19*
• Run your Java application faster
• High-performance JavaScript, Python, Ruby, R, ...
• The first VM for true polyglot programming
• Ahead-of-time compilation for Java (AOT)
• Create standalone binaries with low footprint
• Implement your own language or DSL
• Truffle framework
18. GraalVM AOT for Python you say ?
Evgeny Hanikbloom @CommIt | 2022
“By default, GraalVM runs Python from a binary, compiled ahead-of-time
with Native Image, yielding faster startup time and lower footprint. Although
the ahead-of-time compiled binary includes the Python and LLVM
interpreters, in order to interoperate with other languages you have to supply
the --jvm argument. This instructs the launcher to run on the JVM instead of
in Native Image mode. Thus, you will notice a longer startup time.”
19. JIT : Definition
Evgeny Hanikbloom @CommIt | 2022
In computing, just-in-time (JIT) compilation (also dynamic translation or
run-time compilations) is a way of executing computer code that involves
compilation during execution of a program — at run time — rather than
prior to execution.
20. AOT : Definition
Evgeny Hanikbloom @CommIt | 2022
In computer science, ahead-of-time compilation (AOT
compilation) is the act of compiling a higher-level
programming language such as C or C++, or an
intermediate representation such as Java bytecode or
.NET Framework Common Intermediate Language (CIL)
code, into a native (system-dependent) machine code so
that the resulting binary file can execute natively.
22. Goal
Packaging Size Max Latency
22
Startup Speed
Memory
Footprint
AOT JIT
Peak
Throughput
GraalVM : AOT VS JIT
23. GraalVM Summary
Evgeny Hanikbloom @CommIt | 2022
1. GraalVM allows users to write polyglot applications
that seamlessly pass values from one language to
another by means of the Truffle language
implementation framework (henceforth “Truffle”).
24. GraalVM Toolset
Evgeny Hanikbloom @CommIt | 2022
GraalVM comes with a jvm based set of tools, but due to
polyglot nature of the platform all these tools now can
be used for any language that is natively supported.
Think about VisualVM, Profiler & so on
27. GraalVM Narive Image
Evgeny Hanikbloom @CommIt | 2022
GraalVM comes with a jvm based set of tools, but due to
polyglot nature of the platform all these tools now can
be used for any language that is natively supported.
Think about VisualVM, Profiler & so on