http://www.perlmonks.org?node_id=1047836


in reply to Re^3: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot
in thread A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot

What's with "very partial"? Rakudo/JVM already passes over 99.3% as many spectests as Rakudo/Parrot and looks likely to surpass it this month.

It's absolutely not true that Rakudo/JVM is 40x faster than Rakudo/Parrot in the general case. (That's just for a particular run of Solomon's program.) Indeed it's been roughly 50/50 slower/faster on the benchmarks I've seen. The plan at the moment is to get the JVM port to match Parrot feature-wise and then look at optimizing it. (And I think MoarVM will get more optimization attention than the JVM.)

If Rakudo/JVM does get to be 40x faster than Parrot in the general case, it would be about 2x or 3x slower than Perl 5. (And one would then be able to use features such as native types to outperform Perl 5 for some work.) Imo that would indeed be an achievement, regardless of whether it took 13 or 15 years to get there. Not an achievement to brag about outside the Perl community, of course, but clearly of interest here at the monastery.

Imo, if Parrot had been "designed specifically for", or even sufficiently for, Rakudo, then Rakudo would have reached 6.0.0 as Rakudo/Parrot, MoarVM would not exist, and the JVM port would either not exist or be a lot less tactically important.

(Edit: added italics and parens to clarify.)

  • Comment on Re^4: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot

Replies are listed 'Best First'.
Re^5: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot
by chromatic (Archbishop) on Aug 05, 2013 at 01:17 UTC
    What's with "very partial"?

    Does Rakudo/JVM pass 100% of the specification tests for P6? No? Then it's a partial implementation of P6.

    Imo, if Parrot had been "designed specifically for", or even sufficiently for, Rakudo, then Rakudo would have reached 6.0.0 as Rakudo/Parrot...

    Yeah, the sad reality would be a lot different if Rakudo developers hadn't chased away almost all of the Parrot developers with a multi-year campaign of FUD. (Don't believe me? If you're truly interested in an honest accounting, you could ask them.)

Re^5: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot
by Jenda (Abbot) on Aug 05, 2013 at 10:25 UTC
    Parrot is a register-based process virtual machine designed to run dynamic languages efficiently.

    The differing properties of statically and dynamically typed languages have motivated the design of Parrot. Current popular virtual machines such as the Java virtual machine and the Common Language Runtime, for the .NET platform, have been designed for statically typed languages, while the languages targeted by Parrot are dynamically typed.

    Virtual machines such as the Java virtual machine and the current Perl 5 virtual machine are also stack based. Parrot developers see Parrot's inclusion of registers as an advantage, as it therefore more closely resembles a hardware design, allowing the vast literature on compiler optimization to be used in generating bytecode for the Parrot virtual machine that could run at speeds closer to machine code. Other register-based virtual machines have inspired parts of Parrot's design, including LLVM, the Lua VM and Inferno's Dis.

    Yes, I know this was not a general case, but if getting 40x faster means being 2x to 3x times slower than what we have now, then it's a bigger flop than I thought.

    An anecdote for the Per6 team? Yes. Food for thought for the Parrot developers? Definitely! Something to brag about in public? I don't think so!

    Jenda
    Perl6 - the Multics of programming languages

      MoarVM is register based.

      Cleaned up from http://irclog.perlgeek.de/parrot/2013-06-07#i_7169478:

      dukeleto MoarVM is the spiritual succesor to M0
      benabik  MoarVM seems to match my list of
               "how I would improve/rewrite Parrot"
               to a ridiculous degree.
      dukeleto it uses many lessons from Parrot and other systems
      

      dukeleto is more or less the current Parrot leader. benabik is a recent Parrot contributor (60+ commits).

      M0 is a fundamental Parrot refactor designed to deliver a much cleaner and faster VM.

      Aiui MoarVM combines the M0 approach with direct support for NQP and 6model. (whiteknight, until recently one of the most prolific Parrot committers, said of 6model: "6model is far superior to what Parrot provides ... superior for ... Ruby port ... Python port ... JavaScript port ... all of these would prefer 6model over the current Parrot object model by a wide margin".)

      if getting 40x faster means being 2x to 3x times slower than what we have now, then it's a bigger flop than I thought.

      I'm not suggesting that that will be the final outcome. It's entirely plausible (imo likely) that P6 will end up being seen as faster than P5 over the next few years because P6 naturally supports both multi-core usage and native typing and the MoarVM backend should outperform the JVM backend.

      An anecdote for the Per6 team? Yes. Food for thought for the Parrot developers? Definitely! Something to brag about in public? I don't think so!

      Are you saying that posting something, anything, here at the monastery, is automatically bragging? Did you see the butt load of caveats I began with in the OP?

      I agree it's just 40x faster than on Parrot but it is 40x faster and that's without attempting to optimize it for the JVM. Imo it's worth posting about here at the monastery.

        MoarVM combines the M0 approach with direct support for NQP and 6model.

        Anyone who claims MoarVM has something in common with M0 was not paying attention when Allison, cotto, and I were sitting exactly where I'm sitting right now and finished the list of design goals for M0.

        Now MoarVM may be a fine thing, if it ever runs any Perl 6 code, but you're going to have a dilly of a time convincing people you know what you're talking about if you keep spreading misinformation.