Median speedup for the same problem in Clojure was 12x over Ruby. and 14x for Haskell; ... and 25x in Java .. and 35x in C++...
Median speedup for the same problem in Clojure was 12x over Ruby. and 14x for Haskell; ... and 25x in Java .. and 35x in C++...
The only example you chose shows programs that manually unroll loops are not accepted. (And that's stated explicitly on the Help page. http://shootout.alioth.debian.org/help.php#unroll)
It's a sad nuisance when people opine without checking what's actually shown on a public website.
It's sad to see fact based comments being down voted on HN.
Well, I could simply ignore the question. Or give the answer I got a few years ago, what I did...
> It's sad to see fact based comments being down voted on HN.
Fact based? More like facts querying. Which is the reason I upvoted every single of your comments...
And yet people have down voted.
(Except for meteor-contest.)
>>pervasive laziness... requiring a lot of space/time complexity for other algorithms<<
And GHC provides strictness analysis and explicit strictness to avoid reducing performance.
Do argue - but argue better.
Unfortunately, to argue better does require learning what the website says about the benchmarks game - and for most that's far too much effort.
In our case on the pretty much same loop the difference between Ruby and Clojure was 20-30 times. Please note that using Clojure allowed us direct access to Java libraries, so essentially this is Java performance that we've been able to tap into using Clojure.
Another plus for Clojure is that it allows us to easily have a multi-threaded implementation. JRuby allows native threads too, but Clojure make concurrency really easy, while JRuby just wraps Java threads with nothing more, so I would have to use regular locking and stuff.