SlideShare a Scribd company logo
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Run programs faster
everywhere 
Oleg Šelajev
GraalVM team, Oracle Labs
@shelajev
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Safe Harbor Statement
The following is intended to provide some insight into a line of research in Oracle
Labs. It is intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described in
connection with any Oracle product or service remains at the sole discretion of
Oracle. Any views expressed in this presentation are my own and do not
necessarily reflect the views of Oracle.
2
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !3
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !4
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !5
Fast Java, Scala, Kotlin, Groovy, Clojure...
Instant startup, low footprint
Polyglot & embeddable VM
Interoperability between languages: node.js, Python, Ruby, R
Why GraalVM?
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !6
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !7
Java HotSpot VM
GraalVM Compiler
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !8
Java HotSpot VM
GraalVM Compiler
Truffle Framework
LLVM
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !10
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 11
• More performance
• Smaller footprint
• Managed runtime for better
isolation when running native code
• Oracle Enterprise Support 7x24x365
Launching earlier this month:

GraalVM Enterprise 19.0
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !13
Renaissance suite
https://renaissance.dev
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !14
Streams API example benchmarks
https://medium.com/graalvm/stream-api-performance-with-graalvm-be6cfe7fbb52
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !15
sbt > clean; compile;
https://medium.com/graalvm/compiling-scala-faster-with-graalvm-86c5c0857fa3
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !16
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !17
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !18
Matrix multiplication
https://www.youtube.com/watch?v=RFF2SfPMfpk
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !19
valhallaBench.Multiply.multiply (lower is better)
JDK 11 (size) Mode Cnt Score Error Units
valhallaBench.Multiply.multiply 100 avgt 3 7944.935 ± 1963.931 us/op
JDK11 + Graal (size) Mode Cnt Score Error Units
valhallaBench.Multiply.multiply 100 avgt 3 3450.944 ± 1130.123 us/op
GraalVM EE 1.0-rc8 (size) Mode Cnt Score Error Units
valhallaBench.Multiply.multiply 100 avgt 3 3134.066 ± 518.812 us/op
Matrix multiplication
2.3x
2.5x
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !20
https://twitter.com/janiszt/status/1091678397523283968
22
libgraal previous setup
New in GraalVM 19: libgraal
Use Native-Image to compile
the GraalVM compiler and
link in HotSpot
• Faster startup
• No profile pollution
• Separate heap for

the compiler
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !23
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !25
ECMAScript 6 compatibility
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !26
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !27
Graal.js on JDK11
https://github.com/graalvm/graal-js-jdk11-maven-demo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !28
https://www.youtube.com/watch?v=mRKjWrNJ8DI
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !29
https://medium.com/graalvm/faster-r-with-fastr-4b8db0e0dceb
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !30
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !31
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !32
https://medium.com/graalvm/analyzing-the-heap-of-graalvm-polyglot-applications-b9963e68a6a
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !33
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !34
GraalVM native images
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !35
Native images
• Full AOT compilation to machine code
• Works with memory management
• Secure execution (e.g., bounds checks)
• Embeddable with native applications
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !36
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !37
Now, you can profile any running
program in HotSpot to generate a
configuration file for native image
You can run it multiple times to
exhaust all of the reflective test
paths (proxies, JNI, reflection)
New in GraalVM 19: 

native-image trace agent
Previously, to use Native Image with
reflection*, you needed a
configuration file
You could build it by hand, or use a
framework to generate it
$JAVA_HOME/bin/java -agentlib:native-
image-agent=config-output-dir=META-INF/
native-image/ HelloReflection foo bar

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !39
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !40
Work in progress
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !41
https://medium.com/graalvm/safe-and-sandboxed-execution-of-native-code-f6096b35c360
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !42
High performance, polyglot, language-level virtualization layer…
embeddable across the stack
in native and JVM-based applications.
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !43
Fast Java, Scala, Kotlin, Groovy, Clojure...
Instant startup, low footprint
Polyglot & embeddable VM
Interoperability between languages: node.js, Python, Ruby, R
Why GraalVM?

More Related Content

PPTX
JVM++: The Graal VM
PDF
GraalVm and Quarkus
PPTX
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...
PDF
GraalVM Overview Compact version
PDF
Everything you need to know about GraalVM Native Image
PDF
Introduction to Github Actions
PDF
Spring Native and Spring AOT
JVM++: The Graal VM
GraalVm and Quarkus
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...
GraalVM Overview Compact version
Everything you need to know about GraalVM Native Image
Introduction to Github Actions
Spring Native and Spring AOT

What's hot (20)

PPTX
Introduction to Spring Framework
PDF
Spring Framework - AOP
PPTX
SignalR for ASP.NET Developers
PDF
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
PPTX
Spring Boot Tutorial
PPTX
Spring boot
PDF
Hibernate Presentation
PDF
Native Java with GraalVM
PPTX
Cypress Automation
PDF
GitHub Actions in action
PDF
Getting started with Spring Security
PPTX
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOU
ODP
Monitoring With Prometheus
PDF
The Beginner’s Guide To Spring Cloud
PDF
Microservices with Java, Spring Boot and Spring Cloud
PPT
Spring ppt
PDF
Understanding Reactive Programming
PPTX
Discover Quarkus and GraalVM
PPTX
Spring boot Introduction
PDF
Playwright Begginers Presentation
Introduction to Spring Framework
Spring Framework - AOP
SignalR for ASP.NET Developers
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Spring Boot Tutorial
Spring boot
Hibernate Presentation
Native Java with GraalVM
Cypress Automation
GitHub Actions in action
Getting started with Spring Security
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOU
Monitoring With Prometheus
The Beginner’s Guide To Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
Spring ppt
Understanding Reactive Programming
Discover Quarkus and GraalVM
Spring boot Introduction
Playwright Begginers Presentation
Ad

Similar to GraalVM: Run Programs Faster Everywhere (20)

PDF
General Capabilities of GraalVM by Oleg Selajev @shelajev
PDF
Run Scala Faster with GraalVM on any Platform / GraalVMで、どこでもScalaを高速実行しよう by...
PDF
New opportunities for Developers With GraalVM
PDF
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
PPTX
All you need to know about Spring Boot and GraalVM
PPTX
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
PDF
GraalVM Native Images by Oleg Selajev @shelajev
PPTX
Going AOT: Everything you need to know about GraalVM for Java applications
PDF
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
PPTX
Introduction to GraalVM
PDF
PPTX
Ways to Level Up Your Java Application with GraalVM.pptx
PDF
Graalvm with Groovy and Kotlin - Greach 2019
PDF
GraalVM - MadridJUG 2019-10-22
PDF
GraalVM - OpenSlava 2019-10-18
PPTX
GraalVM - A Step Ahead of JVM Presentation
PDF
Peru JUG Micronaut & GraalVM
PDF
Javantura v4 - JVM++ The GraalVM - Martin Toshev
PPTX
GraalVM how to speedup & lover footprint of your app by doing nothing*
PDF
Graalvm with Groovy and Kotlin - Madrid GUG 2019
General Capabilities of GraalVM by Oleg Selajev @shelajev
Run Scala Faster with GraalVM on any Platform / GraalVMで、どこでもScalaを高速実行しよう by...
New opportunities for Developers With GraalVM
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
All you need to know about Spring Boot and GraalVM
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GraalVM Native Images by Oleg Selajev @shelajev
Going AOT: Everything you need to know about GraalVM for Java applications
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
Introduction to GraalVM
Ways to Level Up Your Java Application with GraalVM.pptx
Graalvm with Groovy and Kotlin - Greach 2019
GraalVM - MadridJUG 2019-10-22
GraalVM - OpenSlava 2019-10-18
GraalVM - A Step Ahead of JVM Presentation
Peru JUG Micronaut & GraalVM
Javantura v4 - JVM++ The GraalVM - Martin Toshev
GraalVM how to speedup & lover footprint of your app by doing nothing*
Graalvm with Groovy and Kotlin - Madrid GUG 2019
Ad

More from J On The Beach (20)

PDF
Massively scalable ETL in real world applications: the hard way
PPTX
Big Data On Data You Don’t Have
PPTX
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
PDF
Pushing it to the edge in IoT
PDF
Drinking from the firehose, with virtual streams and virtual actors
PDF
How do we deploy? From Punched cards to Immutable server pattern
PDF
Java, Turbocharged
PDF
When Cloud Native meets the Financial Sector
PDF
The big data Universe. Literally.
PDF
Streaming to a New Jakarta EE
PDF
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
PDF
Pushing AI to the Client with WebAssembly and Blazor
PDF
Axon Server went RAFTing
PDF
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
PDF
Madaari : Ordering For The Monkeys
PDF
Servers are doomed to fail
PDF
Interaction Protocols: It's all about good manners
PDF
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
PDF
Leadership at every level
PDF
Machine Learning: The Bare Math Behind Libraries
Massively scalable ETL in real world applications: the hard way
Big Data On Data You Don’t Have
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Pushing it to the edge in IoT
Drinking from the firehose, with virtual streams and virtual actors
How do we deploy? From Punched cards to Immutable server pattern
Java, Turbocharged
When Cloud Native meets the Financial Sector
The big data Universe. Literally.
Streaming to a New Jakarta EE
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
Pushing AI to the Client with WebAssembly and Blazor
Axon Server went RAFTing
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
Madaari : Ordering For The Monkeys
Servers are doomed to fail
Interaction Protocols: It's all about good manners
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
Leadership at every level
Machine Learning: The Bare Math Behind Libraries

Recently uploaded (20)

PPTX
Transform Your Business with a Software ERP System
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
System and Network Administraation Chapter 3
PDF
Understanding Forklifts - TECH EHS Solution
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Introduction to Artificial Intelligence
PDF
Digital Strategies for Manufacturing Companies
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Transform Your Business with a Software ERP System
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
VVF-Customer-Presentation2025-Ver1.9.pptx
Design an Analysis of Algorithms II-SECS-1021-03
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo Companies in India – Driving Business Transformation.pdf
System and Network Administraation Chapter 3
Understanding Forklifts - TECH EHS Solution
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Introduction to Artificial Intelligence
Digital Strategies for Manufacturing Companies
Odoo POS Development Services by CandidRoot Solutions
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

GraalVM: Run Programs Faster Everywhere

  • 1. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Run programs faster everywhere  Oleg Šelajev GraalVM team, Oracle Labs @shelajev
  • 2. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement The following is intended to provide some insight into a line of research in Oracle Labs. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in connection with any Oracle product or service remains at the sole discretion of Oracle. Any views expressed in this presentation are my own and do not necessarily reflect the views of Oracle. 2
  • 3. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !3
  • 4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !4
  • 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !5 Fast Java, Scala, Kotlin, Groovy, Clojure... Instant startup, low footprint Polyglot & embeddable VM Interoperability between languages: node.js, Python, Ruby, R Why GraalVM?
  • 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !6
  • 7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !7 Java HotSpot VM GraalVM Compiler
  • 8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !8 Java HotSpot VM GraalVM Compiler Truffle Framework LLVM
  • 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
  • 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !10
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 11 • More performance • Smaller footprint • Managed runtime for better isolation when running native code • Oracle Enterprise Support 7x24x365 Launching earlier this month:
 GraalVM Enterprise 19.0
  • 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
  • 13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !13 Renaissance suite https://renaissance.dev
  • 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !14 Streams API example benchmarks https://medium.com/graalvm/stream-api-performance-with-graalvm-be6cfe7fbb52
  • 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !15 sbt > clean; compile; https://medium.com/graalvm/compiling-scala-faster-with-graalvm-86c5c0857fa3
  • 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !16
  • 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !17
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !18 Matrix multiplication https://www.youtube.com/watch?v=RFF2SfPMfpk
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !19 valhallaBench.Multiply.multiply (lower is better) JDK 11 (size) Mode Cnt Score Error Units valhallaBench.Multiply.multiply 100 avgt 3 7944.935 ± 1963.931 us/op JDK11 + Graal (size) Mode Cnt Score Error Units valhallaBench.Multiply.multiply 100 avgt 3 3450.944 ± 1130.123 us/op GraalVM EE 1.0-rc8 (size) Mode Cnt Score Error Units valhallaBench.Multiply.multiply 100 avgt 3 3134.066 ± 518.812 us/op Matrix multiplication 2.3x 2.5x
  • 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !20
  • 22. 22 libgraal previous setup New in GraalVM 19: libgraal Use Native-Image to compile the GraalVM compiler and link in HotSpot • Faster startup • No profile pollution • Separate heap for
 the compiler
  • 23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !23
  • 24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !25 ECMAScript 6 compatibility
  • 26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !26
  • 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !27 Graal.js on JDK11 https://github.com/graalvm/graal-js-jdk11-maven-demo
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !28 https://www.youtube.com/watch?v=mRKjWrNJ8DI
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !29 https://medium.com/graalvm/faster-r-with-fastr-4b8db0e0dceb
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !30
  • 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !31
  • 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !32 https://medium.com/graalvm/analyzing-the-heap-of-graalvm-polyglot-applications-b9963e68a6a
  • 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !33
  • 34. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !34 GraalVM native images
  • 35. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !35 Native images • Full AOT compilation to machine code • Works with memory management • Secure execution (e.g., bounds checks) • Embeddable with native applications
  • 36. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !36
  • 37. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !37
  • 38. Now, you can profile any running program in HotSpot to generate a configuration file for native image You can run it multiple times to exhaust all of the reflective test paths (proxies, JNI, reflection) New in GraalVM 19: 
 native-image trace agent Previously, to use Native Image with reflection*, you needed a configuration file You could build it by hand, or use a framework to generate it $JAVA_HOME/bin/java -agentlib:native- image-agent=config-output-dir=META-INF/ native-image/ HelloReflection foo bar

  • 39. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !39
  • 40. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !40 Work in progress
  • 41. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | !41 https://medium.com/graalvm/safe-and-sandboxed-execution-of-native-code-f6096b35c360
  • 42. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !42 High performance, polyglot, language-level virtualization layer… embeddable across the stack in native and JVM-based applications.
  • 43. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. !43 Fast Java, Scala, Kotlin, Groovy, Clojure... Instant startup, low footprint Polyglot & embeddable VM Interoperability between languages: node.js, Python, Ruby, R Why GraalVM?