Guilt Free Ruby on the JVM

Similar documents
Faster Ruby and JS with Graal/Truffle

R as a in a Polyglot World

JRuby+Truffle. Why it s important to optimise the tricky parts. Chris Seaton Research Manager Oracle Labs 2 June 2016

What*Language* Would*You*Like*to*Run?*

Using LLVM and Sulong for Language C Extensions

Dynamic Compilation with Truffle

Understanding How Graal Works

JRuby+Truffle. Kevin Menard. Chris Seaton. Benoit Daloze. A tour through a new Ruby Oracle Oracle Labs

1 Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!

FastR: Status and Outlook

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

CURRICULUM VITAE. DI Dr. Matthias Grimmer Michael-Hainisch-Straße Linz

Ruby. JRuby+Truffle and the to JITs. Chris Oracle Labs

Truffle A language implementation framework

Debugging at Full Speed

Copyright 2014 Oracle and/or its affiliates. All rights reserved.

<Insert Picture Here> Graal: A quest for the JVM to leverage its own J Doug Simon - Oracle Labs

<Insert Picture Here>

<Insert Picture Here> Maxine: A JVM Written in Java

Accelerating Interpreted Programming Languages on GPUs with Just-In-Time Compilation and Runtime Optimisations

One VM to Rule Them All

A Fast Abstract Syntax Tree Interpreter for R

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

SPECIALISING DYNAMIC TECHNIQUES FOR IMPLEMENTING THE RUBY PROGRAMMING LANGUAGE

Modern Stored Procedures Using GraalVM

Oracle R Technologies

JVM Continuations. Lukas Stadler. Johannes Kepler University Linz, Austria

Ahead of Time (AOT) Compilation

Safe Harbor Statement

One VM to Rule Them All

A Cost Model for a Graph-Based Intermediate-Representation in a Dynamic Compiler

Practical Partial Evaluation for High-Performance Dynamic Language Runtimes

Just-In-Time GPU Compilation for Interpreted Languages with Partial Evaluation

Efficient Layered Method Execution in ContextAmber

UC Irvine UC Irvine Electronic Theses and Dissertations

Substrate VM. Copyright 2017, Oracle and/or its affiliates. All rights reserved.

Are We There Yet? Simple Language-Implementation Techniques for the 21st Century

Self-Optimizing AST Interpreters

Optimizing Communicating Event-Loop Languages with Truffle

Safe Harbor Statement

Tracing vs. Partial Evaluation

Trace Compilation. Christian Wimmer September 2009

An Empirical Study of PHP Feature Usage: A Static Analysis Perspective

RUBY IS A PURE OBJECT-ORIENTED interpreted language.

Unleash the power of Essbase Custom Defined Functions

Press Release Writing Tips and Tricks for the Enterprise Technology Space

Exploiting High-Performance Heterogeneous Hardware for Java Programs using Graal

Zero-Overhead Metaprogramming

Mission Possible - Near zero overhead profiling. Klara Ward Principal Software Developer Java Mission Control team, Oracle February 6, 2018

Machine-Independent Virtual Memory Management for Paged June Uniprocessor 1st, 2010and Multiproce 1 / 15

<Insert Picture Here> OpenJDK - When And How To Contribute To The Java SE Reference Implementation OSCON 2011, July 26th, 2011

Towards Meta-Level Engineering and Tooling for Complex Concurrent Systems

Ruby AN OVERVIEW. Luigi De Russis Dipartimento di Automatica e Informatica Politecnico di Torino

Introduction to Ruby on Rails

CONTAINER CLOUD SERVICE. Managing Containers Easily on Oracle Public Cloud

Modules, Structs, Hashes, and Operational Semantics

Compilation Queuing and Graph Caching for Dynamic Compilers

OpenJDK Adoption Group

The Z Garbage Collector Low Latency GC for OpenJDK

JDK 9/10/11 and Garbage Collection

Efficient and Thread-Safe Objects for Dynamically-Typed Languages

The OpenJDK Project Past And Present

arxiv: v1 [cs.pl] 10 Nov 2015

Introduction to Ruby on Rails

The Z Garbage Collector An Introduction

Java On Steroids: Sun s High-Performance Java Implementation. History

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

NOSQL DATABASE CLOUD SERVICE. Flexible Data Models. Zero Administration. Automatic Scaling.

Modern and Fast: A New Wave of Database and Java in the Cloud. Joost Pronk Van Hoogeveen Lead Product Manager, Oracle

David Peake Product Manager Oracle Application Express. October Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Executing Legacy Applications on a Java Operating System

Trace-based Just-in-time Compilation for Haskell

Connecting your Microservices and Cloud Services with Oracle Integration CON7348

Snippets: Taking the High Road to a Low Level

!1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

ScootR: Scaling R Dataframes on Dataflow Systems

Was gibt es Neues Better Team Work with Cloud

JRuby: Bringing Ruby to the JVM

Introduction to Ruby on Rails

CS Advanced Compiler Design Course Project

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview...

The Z Garbage Collector Scalable Low-Latency GC in JDK 11

Parfait Lessons Learnt

Sorted on Laps Margin of Victory Avg. Speed Best Lap Tm Best Spd Best Lap by

Project Beehive: A HW/SW co-designed stack for runtime and architecture research

R FUTURE DIRECTIONS. Speaker. FastR (speedup 8.5x GNURast) What have we done so far. BRIXEN June Jan Vitek. Professor of Computer Science

COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY

Copyright 2018, Oracle and/or its affiliates. All rights reserved.

Javaentwicklung in der Oracle Cloud

Oracle Application Container Cloud

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Intermediate Language Design of High- level Language VMs

LLVM Summer School, Paris 2017

Analyzing a social network using Big Data Spatial and Graph Property Graph

Application Container Cloud

Multi-Level Virtual Machine Debugging using the Java Platform Debugger Architecture

CSE 124: LAMPORT AND VECTOR CLOCKS. George Porter October 30, 2017

Future of Java. Post-JDK 9 Candidate Features. Jan Lahoda Java compiler developer Java Product Group, Oracle September, 2017

REAL-TIME JAVA: AN EXPERIENCE REPORT

Transcription:

The Ruby logo is Copyright 2006, Yukihiro Matsumoto. It is licensed under the terms of the Creative Commons Attribution-ShareAlike 2.5 License agreement. Guilt Free Ruby on the JVM Forgetting Conventional Wisdom Chris Seaton Research Manager Oracle Labs October 28, 2015

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. Oracle reserves the right to alter its development plans and practices at any time, and 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.

Program Agenda 1 2 3 4 5 Ruby on the Graal VM How do people want to write Ruby? Why would they feel guilty abut it? How can we fix that? Optimisation deep dive

Ruby on the Graal VM

The Ruby logo is Copyright 2006, Yukihiro Matsumoto. It is licensed under the terms of the Creative Commons Attribution-ShareAlike 2.5 License agreement.

JRuby logo copyright (c) Tony Price 2011, licensed under the terms of Creative Commons Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0) Rubinius logo copyright 2011 Shane Becker, licensed under the terms of Creative Commons Attribution-NoDerivatives 4.0 International CC BY-ND 4.0

T. Würthinger, C. Wimmer, A. Wöß, L. Stadler, G. Duboscq, C. Humer, G. Richards, D. Simon, and M. Wolczko, One VM to rule them all, presented at the Onward! '13: Proceedings of the 2013 ACM international symposium on New ideas, new paradigms, and reflections on programming & software, New York, New York, USA, 2013, pp. 187 204. U Node Rewriting for Profiling Feedback G Compilation using Partial Evaluation G U U Node Transitions I G I G U U U Uninitialized Integer I I I I I AST Interpreter Uninitialized Nodes S String G D Double Generic AST Interpreter Rewritten Nodes Compiled Code

Hotspot

Hotspot JIT

JIT Hotspot JIT

90% core Compatibility with the language and library

Can I run real code today?

http://goo.gl/ssta2t (or search for graal on the Oracle Technology Network) rbenv install jruby-master+graal-dev

git clone https://github.com/lucasocon/openweather.git

../GraalVM-0.9/bin/ruby-tool setup

../GraalVM-0.9/bin/ruby-tool run London San Francisco

Will it be supported in standard Java?

JS R Ruby Truffle Java JVMCI (JVM Compiler Interface) Graal Hotspot C++

JS R Ruby Truffle via Maven etc Graal Hotspot Java 9

How do people want to write Ruby?

Why would you feel guilty about this?

Need to C extensions to remove abstraction

Need to C extensions to remove abstraction

Metaprogramming method calls are slow

Eval is slow

Making Ruby as people use it fast

Method caching class == Fixnum false class == Double false fallback true true call Fixnum#div call Double#div

Metaprogramming method caching name%==%#div% false% name%==%#mul% false% fallback% true% true% class%==%fixnum% true% Fixnum#div% class%==%fixnum% true% Fixnum#mul% false% class%==%double% true% Double#div% false% class%==%double% true% Double#mul% false% false% fallback% fallback%

Can we fold yet?

Conclusions We don t have to pretend Ruby is Java in order to optimise it

Conclusions We don t have to pretend Ruby is Java in order to optimise it We don t need to tell Ruby programmers to avoid language features to get performance

chris.seaton@oracle.com @ChrisGSeaton https://github.com/jruby/jruby/wiki/truffle (or just search for jruby truffle )

Acknowledgements Oracle Labs Danilo Ansaloni Stefan Anzinger Daniele Bonetta Matthias Brantner Laurent Daynès Gilles Duboscq Michael Haupt Christian Humer Mick Jordan Peter Kessler Hyunjin Lee David Leibs Kevin Menard Tom Rodriguez Roland Schatz Chris Seaton Doug Simon Lukas Stadler Michael Van de Vanter Oracle Labs (continued) Adam Welc Till Westmann Christian Wimmer Christian Wirth Paul Wögerer Mario Wolczko Andreas Wöß Thomas Würthinger Oracle Labs Interns Shams Imam Stephen Kell Gero Leinemann Julian Lettner Gregor Richards Robert Seilbeck Rifat Shariyar Oracle Labs Alumni Erik Eckstein Christos Kotselidi JKU Linz Prof. Hanspeter Mössenböck Benoit Daloze Josef Eisl Thomas Feichtinger Matthias Grimmer Christian Häub Josef Haider Christian Hube David Leopoltsederr Manuel Rigger Stefan Rumzucker Bernhard Urban University of Edinburgh Christophe Dubach Juan José Fumero Alfonso Ranjeet Singh Toomas Remmelg LaBRI Floréal Morandat University of California, Irvine Prof. Michael Franz Codrut Stancu Gulfem Savrun Yeniceri Wei Zhang Purdue University Prof. Jan Vitek Tomas Kalibera Romand Tsegelskyi Prahlad Joshi Petr Maj Lei Zhao T. U. Dortmund Prof. Peter Marwedel Helena Kotthaus Ingo Korb University of California, Davis Prof. Duncan Temple Lang Nicholas Ulle 48

Questions?

Safe Harbor Statement The preceding 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. Oracle reserves the right to alter its development plans and practices at any time, and 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.