6 ms·
Scala implement tail call optimization in the compiler. In general the JVM has always outperformed the CLR: http://benchmarksgame.alioth.debian.org/u64q/benchm
by trailfox 13y ago
Scala implement tail call optimization in the compiler. In general the JVM has always outperformed the CLR:
http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=csharp&lang2=java&data=u64q http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
- deleted 13y ago[deleted]
- CmonDev 13y agoThat's Mono - it lags behind .NET CLR.
- trailfox 13y agoI know, but the .NET CLR has lagged the JVM for years in terms of performance, but its a few years since I did a comparison...
- dragonwriter 13y ago> That's Mono - it lags behind .NET CLR. .NET is Windows-only, which is a significant limitation compared to the JVM. I don't think better performance on Windows -- even assuming going to CLR instead of JVM would provide that -- is a good reason for Scala to move to the CLR as the primary target.
- CmonDev 13y agoI understand your point. Consider this: using Xamarin you can get native performance on iOS and better-than-Dalvik performance on Android. Is there a good tool chain for that in JVM/LLVM world that supports Scala?
- dragonwriter 13y ago"Better than Dalvik" isn't necessarily a compelling selling point looking forward, since Android is almost certainly going to moving from Dalvik to ART as the default runtime fairly soon.
- kvb 13y agoNote that Scala doesn't implement general tail call optimization; it only applies to direct self-recursive calls (as far as I'm aware). By contrast, on .NET F# implements true tail call optimization, including cases where the call is statically unknown at compile time (as in `let apply f x = f x`).