Scala
fromScala-lang
1 week agoPorting the Scala 2 optimizer to Scala 3
The Scala 3 compiler's optimizer improves performance by 10-30% for high-level functional code without complicating developer tasks.
Three years ago, Luminal co-founder Joe Fioti was working on chip design at Intel when he came to a realization. While he was working on making the best chips he could, the more important bottleneck was in software. "You can make the best hardware on earth, but if it's hard for developers to use, they're just not going to use it," he told me.
But there's a problem with this sort of trick: how do you know the compiler will keep doing it? What happens when the compiler's next release comes out? How can you catch performance regressions? One solution is benchmarking: you measure your code's speed, and if it gets a lot slower, something has gone wrong. This is useful and important if you care about speed. But it's also less localized, so it won't necessarily immediately pinpoint where the regression happened.