3 ms·
Slower compilation doesn't mean slower execution. Scala has "Native" and JVM implementations with different performance characteristics. Scala is a hybrid that
by randomidiot123 7y ago
Slower compilation doesn't mean slower execution. Scala has "Native" and JVM implementations with different performance characteristics. Scala is a hybrid that allows imperative code with a lower level of abstraction than Haskell, closer to hardware. Thus it is potentially more performant.
- jolux 7y agoSure, but has it been benchmarked? From what I've seen on the benchmarks game GHC is neck and neck with the JVM in most stuff, which is damn impressive. That is admittedly a silly comparison, though.
- randomidiot123 7y agoOf course they have been benchmarked. Both compile to native code, so performance can be roughly the same if the algorithms are the same. However, figuring out how to design a Haskell program that reaches maximum performance is very difficult, and the code probably won't be idiomatic.
- jolux 7y ago> Both compile to native code, so performance can be roughly the same if the algorithms are the same. Can and will are very different statements here though, particularly as the quality of a compiler makes an enormous difference in the performance of the resulting code.
- lalaithion 7y agoMy point is that both compilers are written in their own languages. If scala could be performant, surely the compiler would be too?