SlideShare a Scribd company logo
Submit Search
Upload
Login
Signup
Scala ♥ Graal by Flavio Brasil
Report
scalaconfjp
Follow
Jul. 19, 2019
•
0 likes
•
315 views
1
of
123
Scala ♥ Graal by Flavio Brasil
Jul. 19, 2019
•
0 likes
•
315 views
Download Now
Download to read offline
Report
Software
on June 28th at ScalaMatsuri 2019 http://2019.scalamatsuri.org/index_en.html
scalaconfjp
Follow
Recommended
Continuous Delivery for Mobile platforms (iOS and a bit of Android)
Rami Rantala
362 views
•
52 slides
Enterprise E-Commerce Webinar #3: Bringing Your API to Market
Nikita Sharma
982 views
•
26 slides
GraphQL APIs is with eZ Platform, a Symfony CMS
Jani Tarvainen
291 views
•
18 slides
Mikki Mesfin's Resume
Mikki Mesfin
114 views
•
1 slide
Building APIs with the OpenApi Spec
Pedro J. Molina
1K views
•
35 slides
Kotlin for Android
Han Yin
159 views
•
46 slides
More Related Content
What's hot
Postman Webinar: “Continuous Testing with Postman”
Postman
10.9K views
•
43 slides
Demand driven Applications with GraphQL
Vinci Rufus
787 views
•
30 slides
Whats resources compat_contextcompat_and_appcompat
Chang John
65 views
•
22 slides
Automation, Integration, and Orchestration for Better Engineering Operations
Postman
754 views
•
10 slides
Everything you want to need to know about GraphQL
Smile Gupta
40 views
•
29 slides
Git workflow step by step
Binh Quan Duc
1.3K views
•
53 slides
What's hot
(20)
Postman Webinar: “Continuous Testing with Postman”
Postman
•
10.9K views
Demand driven Applications with GraphQL
Vinci Rufus
•
787 views
Whats resources compat_contextcompat_and_appcompat
Chang John
•
65 views
Automation, Integration, and Orchestration for Better Engineering Operations
Postman
•
754 views
Everything you want to need to know about GraphQL
Smile Gupta
•
40 views
Git workflow step by step
Binh Quan Duc
•
1.3K views
Enterprise Day 2015 - JIRA in the enterprise (Scania)
Riada AB
•
638 views
Strategie di testing: Spring Boot loves Kotlin
Marco Fracassi
•
329 views
How to Build APIs - MHacks 2016
Dan Cundiff
•
706 views
CI CD Jenkins for Swift Deployment
Bintang Thunder
•
174 views
Introduction to lambda behave
RichardWarburton
•
838 views
Kotlin for android development
Jalpesh Vasa
•
163 views
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
DataArt
•
142 views
2014 austin-api-sdks-are-apis-too
Jeff Brateman
•
760 views
Coding Dojo: Adding Tests to Legacy Code (2014)
Peter Kofler
•
1.1K views
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
apidays
•
81 views
QA Fest 2018. Александр Венгер. ELK stack. Применение в нагрузочном тестирова...
QAFest
•
688 views
D8 Dexer
Phani Kumar Gullapalli
•
130 views
Gradle plugins for Test Automation
Katherine Golovinova
•
90 views
ESEconf2011 - Freixa Vidal Roger: "Oracle's Java Strategy"
Aberla
•
639 views
Similar to Scala ♥ Graal by Flavio Brasil
Scala and Play with Gradle
Wei Chen
2.1K views
•
26 slides
GraalVM - MadridJUG 2019-10-22
Jorge Hidalgo
508 views
•
61 slides
GraalVM - JBCNConf 2019-05-28
Jorge Hidalgo
717 views
•
52 slides
GraalVM - OpenSlava 2019-10-18
Jorge Hidalgo
309 views
•
61 slides
TechEvent Graal(VM) Performance Interoperability
Trivadis
383 views
•
40 slides
GraphQL-ify your APIs - Devoxx UK 2021
Soham Dasgupta
102 views
•
28 slides
Similar to Scala ♥ Graal by Flavio Brasil
(20)
Scala and Play with Gradle
Wei Chen
•
2.1K views
GraalVM - MadridJUG 2019-10-22
Jorge Hidalgo
•
508 views
GraalVM - JBCNConf 2019-05-28
Jorge Hidalgo
•
717 views
GraalVM - OpenSlava 2019-10-18
Jorge Hidalgo
•
309 views
TechEvent Graal(VM) Performance Interoperability
Trivadis
•
383 views
GraphQL-ify your APIs - Devoxx UK 2021
Soham Dasgupta
•
102 views
Getting Started with Spring for GraphQL
VMware Tanzu
•
291 views
EJB 3.2/JPA 2.1 Best Practices with Real-Life Examples - CON7535
Ahmad Gohar
•
978 views
JVM++: The Graal VM
Martin Toshev
•
6K views
markedj: The best of markdown processor on JVM
takezoe
•
5.1K views
How and why GraalVM is quickly becoming relevant for you (DOAG 2020)
Lucas Jellema
•
205 views
Javantura v4 - JVM++ The GraalVM - Martin Toshev
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
•
4.9K views
Continuous Integration for Spark Apps by Sean McIntyre
Spark Summit
•
3.6K views
TaraVault Overview Presentation (2021)
Inflectra
•
1.2K views
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens
•
192 views
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
Natan Silnitsky
•
624 views
Guiding Diffy to the Enterprise land
Dariusz Łuksza
•
880 views
WSO2Con EU 2015: Keynote - The Containerization of the Developer Workspace
WSO2
•
729 views
GraphQL-ify your APIs
Soham Dasgupta
•
45 views
Getting started with karate dsl
Knoldus Inc.
•
277 views
More from scalaconfjp
脆弱性対策のためのClean Architecture ~脆弱性に対するレジリエンスを確保せよ~
scalaconfjp
112 views
•
50 slides
Alp x BizReach SaaS事業を営む2社がお互い気になることをゆるゆる聞いてみる会
scalaconfjp
72 views
•
20 slides
GraalVM Overview Compact version
scalaconfjp
2K views
•
70 slides
Run Scala Faster with GraalVM on any Platform / GraalVMで、どこでもScalaを高速実行しよう by...
scalaconfjp
841 views
•
37 slides
Monitoring Reactive Architecture Like Never Before / 今までになかったリアクティブアーキテクチャの監視...
scalaconfjp
222 views
•
16 slides
Scala 3, what does it means for me? / Scala 3って、私にはどんな影響があるの? by Joan Goyeau
scalaconfjp
318 views
•
79 slides
More from scalaconfjp
(20)
脆弱性対策のためのClean Architecture ~脆弱性に対するレジリエンスを確保せよ~
scalaconfjp
•
112 views
Alp x BizReach SaaS事業を営む2社がお互い気になることをゆるゆる聞いてみる会
scalaconfjp
•
72 views
GraalVM Overview Compact version
scalaconfjp
•
2K views
Run Scala Faster with GraalVM on any Platform / GraalVMで、どこでもScalaを高速実行しよう by...
scalaconfjp
•
841 views
Monitoring Reactive Architecture Like Never Before / 今までになかったリアクティブアーキテクチャの監視...
scalaconfjp
•
222 views
Scala 3, what does it means for me? / Scala 3って、私にはどんな影響があるの? by Joan Goyeau
scalaconfjp
•
318 views
Functional Object-Oriented Imperative Scala / 関数型オブジェクト指向命令型 Scala by Sébasti...
scalaconfjp
•
321 views
Introduction to GraphQL in Scala
scalaconfjp
•
721 views
Safety Beyond Types
scalaconfjp
•
551 views
Reactive Kafka with Akka Streams
scalaconfjp
•
681 views
Reactive microservices with play and akka
scalaconfjp
•
2K views
Scalaに対して意識の低いエンジニアがScalaで何したかの話, by 芸者東京エンターテインメント
scalaconfjp
•
810 views
DWANGO by ドワンゴ
scalaconfjp
•
635 views
OCTOPARTS by M3, Inc.
scalaconfjp
•
1.2K views
Try using Aeromock by Marverick, Inc.
scalaconfjp
•
1.2K views
統計をとって高速化する Scala開発 by CyberZ,Inc.
scalaconfjp
•
962 views
Short Introduction of Implicit Conversion by TIS, Inc.
scalaconfjp
•
550 views
ビズリーチ x ScalaMatsuri by BIZREACH, Inc.
scalaconfjp
•
905 views
sbt, past and future / sbt, 傾向と対策
scalaconfjp
•
4.5K views
The Evolution of Scala / Scala進化論
scalaconfjp
•
5.2K views
Recently uploaded
What is Microsoft Power BI used for.pptx
JohnCommuserv
12 views
•
6 slides
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
Roberto Pérez Alcolea
426 views
•
86 slides
TorfsBot or Not? Evaluating User Perception on Imitative Text Generation (CLI...
Thomas Winters
11 views
•
26 slides
Deckible POV - Point of View
Nick Kellet
6 views
•
4 slides
Our Story, Orange Nile
ManolodelaFuente1
7 views
•
14 slides
Winter 24 Highlights.pdf
PatrickYANG48
5 views
•
23 slides
Recently uploaded
(20)
What is Microsoft Power BI used for.pptx
JohnCommuserv
•
12 views
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
Roberto Pérez Alcolea
•
426 views
TorfsBot or Not? Evaluating User Perception on Imitative Text Generation (CLI...
Thomas Winters
•
11 views
Deckible POV - Point of View
Nick Kellet
•
6 views
Our Story, Orange Nile
ManolodelaFuente1
•
7 views
Winter 24 Highlights.pdf
PatrickYANG48
•
5 views
Document WhatsApp Messaging
Geminate Consultancy Services
•
8 views
Climate Impact of Software Testing
Kari Kakkonen
•
54 views
Improving User Experience with Our Website Feedback Tool
Not8 App
•
10 views
The Never Landing Stream with HTAP and Streaming
Timothy Spann
•
167 views
PostgreSQL Prologue
Md. Golam Hossain
•
12 views
Semantic Search_ NLP_ ML.pdf
PlamenaDzharadat
•
13 views
The Next Era of CRM.pdf
PatrickYANG48
•
8 views
A sighting of sequence function in Practical FP in Scala
Philip Schwarz
•
9 views
Empowering Advanced Users: Extending OutSystems UI Framework with Openness an...
Bernardo Cardoso
•
39 views
Domain storytelling-one-size-fit-all process
Michael Chen
•
7 views
OutSystems Security Specialization - Study Help Deck
Fábio Godinho
•
47 views
Kubernetes with Cilium in AWS - Experience Report!
QAware GmbH
•
19 views
BMC Software.pptx
Cloudaction
•
5 views
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Natan Silnitsky
•
105 views
Scala ♥ Graal by Flavio Brasil
1.
Flavio W. Brasil @flaviowbrasil Twitter,
VM Team Scala ❤ Graal
2.
#TwitterVMTeam
3.
Scala’s performance challenges Why Twitter adopted Graal New optimizations 1
#Deploy 2 #Profile 3 #Optimize Agenda
4.
#Deploy Why Twitter adopted
Graal
5.
What is Graal?
6.
Graal != GraalVM
7.
Graal != GraalVM
9.
What is a
JIT compiler?
10.
Source code
11.
Source code Bytecode
12.
Source code Bytecode
Native
14.
Performance Ease of change Why
Graal
17.
C2 is a
20yo codebase in C++
18.
Graal is much easier
to change
19.
#Profile Scala’s performance challenges
20.
Scala is not
Java (but Java is becoming Scala)
22.
Composable APIs Scala’s performance
nightmare
23.
Composable APIs are interpreted
languages
39.
Why does a
single indirection have this effect?
44.
👍
45.
😕
46.
Interpreted languages are difficult
to optimize
47.
Embedded Interpreted languages are even
more difficult to optimize
48.
#Optimize New optimizations by
the #TwitterVMTeam
49.
First target: Future
59.
Synchronization
70.
Opaque
71.
CAS Virtualization https://github.com/oracle/graal/pull/636
76.
Q4/2018 Results
77.
* Includes code
changes https://github.com/twitter/util/commit/3245a8 -16% alloc/s-5% CPU CAS Optimizations (regular load)
78.
All optimizations (stress test)
79.
All optimizations (stress test)
80.
All optimizations (stress test)
81.
Second target: itable stub
calls
82.
What is an
itable stub?
83.
Virtual call
84.
Virtual call
85.
Virtual call
86.
Virtual call Object getClass 1 toString
2
87.
Virtual call Object getClass 1 toString
2 Mammal getClass 1 toString 2
88.
Virtual call Object getClass 1 toString
2 Mammal getClass 1 toString 2 speak 3
89.
Virtual call Object getClass 1 toString
2 Mammal getClass 1 toString 2 speak 3 Human getClass 1 toString 2 speak 3
90.
Virtual call Object getClass 1 toString
2 Mammal getClass 1 toString 2 speak 3 Human getClass 1 toString 2 speak 3 speak(String) 4
91.
Interface call
92.
Interface call
93.
Interface call
94.
Interface call Human Named 1 Mammal
2
95.
Interface call Human Named 1 Mammal
2 Human/ Mammal speak 2 Human/ Named name 1
96.
Interface call Human Named 1 Mammal
2 Human/ Mammal speak 2 Human/ Named name 1 ❓
97.
Interface call Human Named 1 Mammal
2 Human/ Mammal speak 2 Human/ Named name 1 ❌
98.
Interface call Human Named 1 Mammal
2 Human/ Mammal speak 2 Human/ Named name 1 ❌ ❓
99.
Interface call Human Named 1 Mammal
2 Human/ Mammal speak 2 Human/ Named name 1 ❌ ✅
100.
Interface call Human Named 1 Mammal
2 Human/ Mammal speak 2 Human/ Named name 1 ❌ ✅ ✅
101.
How can we
optimize it?
103.
Data-driven approach
105.
Top invokes
106.
Common offsets
107.
Common offsets
108.
Top invokes Common
offsets
109.
What if a
new class is observed?
110.
Call A B
111.
Call A B C
112.
Deoptimization is challenging
113.
Single method
114.
Common super class
115.
Fingerprint
118.
Q1/2019 Initial results
119.
Invoke interface optimization (stress
test) Max RPS Max QPS Baseline 735 3762 Optimized 1349 4548 Improvement 83% 20%
120.
Before After Invoke interface
optimization (stress test)
121.
Before After
122.
Performance ✅ Ease of
change ✅ Why Graal
123.
Thank you!