3 ms·
Benchmarks game used to have stats for Scala but apparently not anymore. Many of Scalas abstractions, unlike Kotlin, have runtime cost
by thermodynthrway 8y ago
Benchmarks game used to have stats for Scala but apparently not anymore.
Many of Scalas abstractions, unlike Kotlin, have runtime cost
- DavidTNcl 8y ago> Many of Scalas abstractions, unlike Kotlin, have runtime cost Got a source for that?
- tormeh 8y agoWell, you don't have to use those abstractions. But yes, it's a sad fact that when programming in Scala, the closer to Java-style you program, the faster your program will be. I haven't read this paper closely, but it looks like it's more measuring the performance of Akka, rather than the performance of Scala. Akka does reasonably well here compared to Erlang, so I don't think there's anything we can complain about. Could you get all of Akka's features with better performance if it was made in Java? I doubt it. Optimized Scala and Java code should be identical.
- deleted 8y ago[deleted]
- merb 8y agoThis depends on the VM you are using. Currently GraalVM gives Scala a huge speedup (sadly the speedup comes with startup cost, etc, which would not benefit the bechnmarks game)
- kodablah 8y ago> Many of Scalas abstractions, unlike Kotlin, have runtime cost Whoa there, many of Kotlin's do too. Because one uses an option class and another inserts precondition checks in a lot of places, doesn't mean the latter is zero cost. While Kotlin overall probably has less overhead with better primitive use and what not, there are cases where Scala is less because of macro support.