Write a Blog >>
Scala 2017
Sun 22 - Mon 23 October 2017 Vancouver, Canada
co-located with SPLASH 2017
Sun 22 Oct 2017 14:00 - 14:30 at Regency C - Compilation Chair(s): Paolo G. Giarrusso

Functional collection combinators are a neat and widely accepted data processing abstraction. However, their generic nature results in high abstraction overheads – Scala collections are known to be notoriously slow for typical tasks. We show that proper optimizations in a JIT compiler can widely eliminate overheads imposed by these abstractions. Using the open-source Graal JIT compiler, we achieve speedups of up to 20x on collection workloads compared to the standard HotSpot C2 compiler. Consequently, a sufficiently aggressive JIT compiler allows the language compiler, such as Scalac, to focus on other concerns.

In this paper, we show how optimizations, such as inlining, polymorphic inlining, and partial escape analysis, are combined in Graal to produce collections code that is optimal with respect to manually written code, or close to optimal. We argue why some of these optimizations are more effectively done by a JIT compiler. We then identify specific use-cases that most current JIT compilers do not optimize well, warranting special treatment from the language compiler.

Sun 22 Oct

Displayed time zone: Tijuana, Baja California change

13:30 - 15:00
CompilationScala 2017 at Regency C
Chair(s): Paolo G. Giarrusso University of Tübingen, Germany
13:30
30m
Talk
A Scala Framework for Supercompilation
Scala 2017
DOI
14:00
30m
Talk
Making Collection Operations Optimal with Aggressive JIT Compilation
Scala 2017
Aleksandar Prokopec Oracle Labs, David Leopoldseder Johannes Kepler University Linz, Gilles Duboscq Oracle Labs, Thomas Wuerthinger Oracle Labs
DOI
14:30
30m
Talk
ScalaSMT: Satisfiability Modulo Theory in Scala (Tool Paper)
Scala 2017
Franck Cassez Macquarie University, Australia, Anthony Sloane Macquarie University
DOI