Perl 6 and performanceby kikuchiyo (Monk)
|on Feb 09, 2012 at 15:54 UTC||Need Help??|
kikuchiyo has asked for the
wisdom of the Perl Monks concerning the following question:
When the first version of Rakudo Star came out, I was eager to try it, but I was, erm, somewhat underwhelmed by the fact that its performance was not quite up to what some people might have expected:
One year later, I've tried the same "benchmark" with Rakudo Star 2011.07:
Well, it's an improvement.
Now, the latest version (2012.01) came out, supposedly with great improvements, so I thought I'd try it.
To my great consternation the same script didn't complete within three minutes. I tried to lower the loop range:
Note that the result is incorrect (it is a number actually).
I've tried other ranges:
A very pronounced O(N2) trend can be observed here. Is this a known problem? Because it is a problem: there is nothing in the algorithm that would imply such a quadratic behavior, and indeed, with Rakudo 2011.07, elapsed time grows linearly with the number of iterations.
As to the NaN,
To paraphrase a certain presentation about weird programming languages that's become popular lately,