Re:Why functional programming matters (1990) [pdf]
by randomidiot123 on Friday November 08, 2019 @06:13PM
(#21487912)
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.
[ Parent
| on HN ]
Re:Why functional programming matters (1990) [pdf]
by jolux on Saturday November 09, 2019 @12:11AM
(#21489751)
Sure, 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.
Re:Why functional programming matters (1990) [pdf]
by randomidiot123 on Saturday November 09, 2019 @01:38AM
(#21490021)
Of 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.
Re:Why functional programming matters (1990) [pdf]
by jolux on Saturday November 09, 2019 @11:00AM
(#21492242)
> 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.
Re:Why functional programming matters (1990) [pdf]
by lalaithion on Saturday November 09, 2019 @03:40PM
(#21494207)
My point is that both compilers are written in their own languages. If scala could be performant, surely the compiler would be too?