At the YAPC::NA in June 2012, Patrick Michaud did a lightning talk (five minutes) about the speed of Rakudo, a leading Perl 6 compiler. (Video of his energetic and fun 5 minute presentation. To catch details you might want to look at his slides.)

In summary, for the chosen benchmarks, in June 2012 the Rakudo compiler was about 10x to 100x faster than it was 18 months prior, but still about 100x slower than mainstream languages/compilers like Perl 5's perl.

It's gotten faster since, but in late 2012 Larry Wall said on #perl6 "performance is still the main blocker to widespread adoption of Perl 6".

I agree with Larry. (There are other issues of course. Carl Mäsak immediately added "and CPAN/Perl 5 integration". But, as Larry went on to say, "if Perl 6 were fast enough, we couldn't stop people from translating Perl 5 CPAN into Perl 6 CPAN in droves".)

One strategy tactic to speed up Rakudo would be to speed up the VM on which it runs. Currently Rakudo Perl 6 runs on the Parrot VM. There's been effort to speed up Parrot for years. Another approach would be to target a different VM. And there's been effort in preparing for that for years.

Rakudo is written in a mix of languages. For Rakudo to target a different VM than Parrot, a key chunk of the work involved is to port a small language called NQP that until very recently only ran on Parrot.

Jonathan Worthington began preparing a port of NQP to the JVM late last year. Jonathan has been making rapid progress on the port of NQP to JVM. Today he posted an outstanding blog post about the JVM port.

Then later today on #perl6 Nicholas Clark said "not exactly comparing like-with-like, but for various fibonachi example scripts, NQP on the JVM is 8 times faster than on Parrot and runs in about 60% of the time of Perl 5".

Early results often obscure all the work that is to come. Jonathan clearly thinks it'll take another few months to port Rakudo to the JVM. So don't expect a much faster Perl 6 this month. But it's clear that Perl 6 is going to get a lot faster in 2013.

I've been watching Perl 6 since the start. I recall the excitement and fun on #perl6 when Audrey was pushing Pugs forward very rapidly. I see the same signs this year, with Jonathan the genius at the center of a whirlwind of progress. If you love Perl and want to have a lot of fun, consider dropping in on #perl6, the freenode IRC channel.

Comment on Perl 6 is going to get a lot faster in 2013
Re: Perl 6 is going to get a lot faster in 2013
by moritz (Cardinal) on Feb 02, 2013 at 21:48 UTC

    Rakudo also got two new small-scale optimizations last month: junction rewriting and constant folding. The former by a relative new contributor (who started submitting the first small Rakudo patches less than a year ago, and only started with slightly larger patches this year), and the latter took me only a few hours of work.

    In my humble opinion, the encouraging thing is not the fact of the optimizations themselves, but that they are written in a subset of Perl 6, and thus accessible to contributors who don't have mad compiler writing skills, nor are intimately familiar with memory and cache models and other low-level details.

Re: Perl 6 is going to get a lot faster in 2013
by chromatic (Archbishop) on Feb 03, 2013 at 02:11 UTC
    But it's clear that Perl 6 is going to get a lot faster in 2013.

    ... based on microbenchmarks of a language that isn't Perl 6?

      But it's clear that Perl 6 is going to get a lot faster in 2013.
      ... based on microbenchmarks of a language that isn't Perl 6?

      No. You've picked up on what I consider a point of interest rather than the big picture.

      The outlook for Perl 6 speed improvement in 2013 is based on many factors:

      • I mentioned several factors in my post. For example, Larry Wall declaring speed to be the #1 blocker of adoption in November.

      • There are other factors I didn't mention. For example, Rakudo is sufficiently complete that the existing core hackers are fairly free to focus on other things, and speed is increasingly becoming a priority for Jonathan and Moritz. Furthermore, as Moritz notes, the Rakudo toolchain has reached the point that non-core-hackers are successfully hacking on AST generation and NQP to improve speed (with the nice side effect of leading them toward being new core hackers). I could continue but I recommend anyone interested visits #perl6 and asks questions.

      As for "a language that isn't Perl 6" I'll point out that NQP is basically a small subset of Perl 6 (NQP stands for Not Quite Perl) and Rakudo compiles to NQP. So if NQP gets faster, Rakudo Perl 6 gets faster.

        For example, Larry Wall declaring speed to be the #1 blocker of adoption in November.

        A lot of people have declared a lot of things over the lifetime of the project. Most of them haven't happened. I will believe them when I see them.

        ... if NQP gets faster, Rakudo Perl 6 gets faster.

        That's nonsense. Features aren't free. Parrot has at various times beaten a lot of languages and implementations on various microbenchmarks, and Rakudo and even NQP didn't.

        Larry can declare that speed is the number one blocker of adoption as much as he likes. The real blocker to adoption is that perl 6 ain't yet complete.
Re: Perl 6 is going to get a lot faster in 2013
by Anonymous Monk on Feb 03, 2013 at 16:43 UTC
    Faster and faster on its way to irrelevance ... five years too late to matter to anyone.
      Maybe you are anyone, and it doesn't matter tou you... but it does matter for some people.