Challenges of Optimizing Scala Programs
Inside every optimizing compiler, there is a partial evaluator waiting to be set free. Most high-level program optimizations can be seen as attempts to evaluate parts of the program statically, before its execution starts. In some cases, these optimizations simulate steps in the program’s execution which are always taken, but in other cases, optimizations simulate steps that are likely to occur. For a functional programming language, such as Scala, these partial evaluations tend to make the code less abstract and more concrete, similar to how a C++ compiler replaces template parameters with concrete values. However, an optimizing compiler for languages without explicit templates has an additional hurdle – not only must a compiler apply an optimization, but it must also infer the situations in which it makes sense to do so. More often than not, to achieve this, the compiler gambles.
In this talk, I will show how these concepts work within the Graal JIT compiler. The talk will cover the speculative aspects of Graal’s optimizations, using concrete Scala programs as running examples. I will conclude the talk by describing the open problems and challenges for efficient compilation of Scala programs.
I am a principal researcher at Oracle Labs, working on the Graal language infrastructure project. My research is focused on virtual machines and JIT compilers, as well as programming language abstractions for concurrent and distributed computing.
Previously, I worked at Google on cloud computing infrastructure and big data analytics for Google Maps. Before that, I was working as a research assistant in the School of Computer and Communication Sciences at the EPFL in Switzerland, in the LAMP laboratory on Scala development under the supervision of dr. Martin Odersky, where I received a doctoral degree in 2014.
Wed 17 Jul
|15:40 - 16:10|
|16:10 - 16:30|
Aleksandar ProkopecOracle Labs
|16:30 - 16:50|