Professional Documents
Culture Documents
Graalvm: Scott Lynn Director of Product Strategy, Oracle Linux
Graalvm: Scott Lynn Director of Product Strategy, Oracle Linux
Scott Lynn
Director of Product Strategy, Oracle Linux
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
Use Different Languages for Different Jobs
Long tail of programming languages
Programming Language Popularity
(TOP 20 Languages From May 2017 Tiobe INDEX)
• You run more than a few languages
Java
• Even cloud businesses like Twitter have
“legacy” code Others
Scratch C#
PL/SQL
Delphi/Object Pascal VB.NET
MATLAB
JavaScript
Go
Objective-C Assembly language
R PHP
Swift VB Ruby Perl
* Source: ZDNet.com: “What is Docker and why is it so darn popular?”, May 7, 2017
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Apps in Containers
Language Runtimes Are Generally Pretty Big
• “Hello World” in Java: 24 MB
• “Hello World” in JavaScript (V8): 18 MB
• “Hello World” in Ruby/Rails: 8 MB
Java Libs Java Libs Java Libs Ruby Libs Ruby Libs Python JS Libs JS Libs
Python
JBoss JBoss JBoss Rails Rails Node.js Node.js
Libs
Compiled
JavaScript Ruby R Python Compiled
Interpreter Interpreter code snippet
Compiled
GraalVM Interpreter Interpreter code snippet
Compiled
code snippet
Compiled
compiler Truffle API code snippet
Compiled
code snippet
Java Runtime code snippet
JavaScript
application
JavaScript
libraries
Ruby
application
Ruby gems
& libraries
…
Node.js Rails
Compiled
JavaScript Ruby R Python Compiled
Interpreter Interpreter code snippet
Compiled
GraalVM Interpreter Interpreter code snippet
Compiled
code snippet
Compiled
compiler Truffle API code snippet
Compiled
code snippet
Java Runtime code snippet
JavaScript
application
JavaScript
libraries
Ruby
application
Ruby gems
& libraries
…
Node.js Rails
Compiled
JavaScript Ruby R Python Compiled
Interpreter code snippet
Compiled
GraalVM Interpreter Interpreter Interpreter code snippet
Compiled
code snippet
Compiled
compiler Truffle API code snippet
Compiled
code snippet
Java Runtime code snippet
JavaScript
application
JavaScript
libraries
Ruby
application
Ruby gems
& libraries
… R native
libraries
Node.js
native libs
Ruby/Rails
Node.js Rails native libs
Compiled
JavaScript Ruby R Python LLVM .bc Compiled
Interpreter Interpreter code snippet
Compiled
GraalVM Interpreter Interpreter Interpreter code snippet
Compiled
code snippet
Compiled
compiler Truffle API code snippet
Compiled
code snippet
Java Runtime code snippet
eval("application/x-ruby",
"def add(a, b) a + b;
application
JavaScript
libraries
application
Ruby gems
& libraries
… libraries
Node.js
native libs
Ruby/Rails
end;");
Node.js Rails native libs
Truffle
Polyglot JavaScript Ruby R LLVM .bc
API
Interpreter Interpreter Interpreter Interpreter
Compiled
Truffle CI Java Compiled
code snippet
Truffle API application codeCompiled
snippet
Graal Compiled
code snippet
JavaVM Runtime Compiled
code snippet
compiler codeCompiled
snippet
JVMCI code snippet
Threads / Scheduler Filesystem Network GC / heap Code cache
eval("application/x-ruby",
"def add(a, b) a + b;
application
JavaScript
libraries
application
Ruby gems
& libraries
… libraries
Node.js
native libs
Ruby/Rails
end;");
Node.js Rails native libs
Truffle
Polyglot JavaScript Ruby R LLVM .bc
API
Interpreter Interpreter Interpreter Interpreter
Compiled
Truffle CI Compiled
code snippet
Truffle API codeCompiled
snippet
Graal Compiled
code snippet
GraalVM Runtime GC / heap Code cache Compiled
code snippet
compiler codeCompiled
snippet
code snippet
Oracle RDBMS Runtime Net Filesystem Threads / Scheduler
Java Libs Java Libs Java Libs Ruby Libs Ruby Libs Python JS Libs JS Libs
Python
JBoss JBoss JBoss Rails Rails Node.js Node.js
Libs
Speedup Comparison
Range (Geomean) Versus
Java 0.8x - 2x 1.1x JDK8
Scala 0.8x - 2x 1.3x JDK8
JavaScript 0.5x - 1.5x 1.05x Google V8
Ruby 1x - 100x 5x JRuby
R 1x - 100x 5x GNU R
C/C++ 0.4x - 1.2x 0.9x LLVM native
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 15
Application Level Performance
What about real applications, not just benchmarks
• According to Twitter, Graal runs Twitter 25%
faster than Java8
• WebLogic Server has 10% better throughput