Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by Jenda (Abbot)
on Aug 04, 2013 at 21:57 UTC ( [id://1047830]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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

OK, so a very partial implementation of Perl6, on a virtual machine that was designed for an absolutely different language, is 40 times faster than on a virtual machine that was designed specifically for this kind of languages. After some fifteen years of development. And it's an achievement.

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^4: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot
by raiph (Deacon) on Aug 04, 2013 at 23:39 UTC
    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.)

      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.)

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1047830]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-19 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found