Making Collection Operations Optimal with Aggressive JIT Compilation
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 OctDisplayed time zone: Tijuana, Baja California change
13:30 - 15:00 | |||
13:30 30mTalk | A Scala Framework for Supercompilation Scala 2017 DOI | ||
14:00 30mTalk | 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 30mTalk | ScalaSMT: Satisfiability Modulo Theory in Scala (Tool Paper) Scala 2017 DOI |