Speaker: Roman Grebennikov
Topic: Scala perfomance for those who doubt
Abstract: Scala language has a lot of nifty features like pattern matching, recursion, collections with lambdas and other things from functional programming world. And all these features are combined together in a way that makes programming happier.
But all these dreams about FP magic can be easily destroyed by the fact, that "when I rewrote all my spaghetti Java code to a Scala one-liner, why did it become three times slower?". Brutal reality hints us that all these modern high-level abstractions may hide monsters inside and a comfort you get by using them has it's own price. And if you develop something more complex than a simple CRUD application and it's even slightly connected with performance, you must clearly understand how do all these "monads" behave.
This talk will tell you about magic performed by scala compiler, will show you a couple of horror stories about scala performance with explanations and solutions:
JMH and how to use it with Scala.
What happens when you hit 'compile' button.
Pattern-matching, tail recursion and collections under the hood.
How HotSpot optimises your code.
Parental advisory: 18+, explicit x86_64 assembly inside.
![](https://i.ytimg.com/vi/oHtaD5oXPtc/maxresdefault.jpg)