←back to thread

Scala 3 slowed us down?

(kmaliszewski9.github.io)
261 points kmaliszewski | 4 comments | | HN request time: 0s | source
Show context
groundzeros2015 ◴[] No.46184787[source]
I know this topic has been beat to death but this is another example of why high level language with super optimizing compiler has had less industry success.

If performance is a feature it needs to be written in the code. Otherwise it implicitly regresses when you reorder a symbol and you have no recourse to fix it, other than fiddling to see if it likes another pattern.

replies(1): >>46184862 #
alberth ◴[] No.46184862[source]
To be fair, it’s misleading to group Scala (or any JVM language), with other “high-level languages.”

The JVM is extremely mature and performant, and JVM-based languages often run 5x (or more) than non-JVM high-level languages like Python or Ruby.

replies(1): >>46184894 #
1. groundzeros2015 ◴[] No.46184894[source]
That doesn’t follow. Scala is a high level language and compiler above the JVM. The bug here is a high level one:

> Turns out there was indeed a subtle bug making chained evaluations inefficient in Scala 3

I’m comparing with Haskell, Scheme, or even SQl which all promise to compile efficient code from high level descriptions.

replies(1): >>46186521 #
2. blandflakes ◴[] No.46186521[source]
The bug in TFA is hardly a reason that Scala is not a success, though.
replies(1): >>46186694 #
3. groundzeros2015 ◴[] No.46186694[source]
I didn’t say that. I’m highlighting a specific challenge of getting predictable performance over the lifetime of code.

Lower-level languages don’t have this same problem to the same extent. They have other problems Scala doesn’t have.

replies(1): >>46210891 #
4. still_grokking ◴[] No.46210891{3}[source]
> Lower-level languages don’t have this same problem to the same extent.

Of course they have.

If the computer would directly execute what you write down in what you call "low level language" this would be slow as fuck.

Without highly optimizing compilers even stuff like C runs pretty slow.

If something about the optimizer or some other translation step of a compiler changes this has often significant influence on the performance of the resulting compilation artifacts.