Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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 ( #1047892=note: print w/ replies, xml ) Need Help??


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

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


Comment on Re^5: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot
Re^6: A $dayjob Perl 6 program that runs 40x faster on the JVM than on Parrot
by raiph (Friar) on Aug 06, 2013 at 00:20 UTC
    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.

        dukeleto, effectively the current leader of the Parrot project, writing in 2011: "the most important reason for M0 is {that} it is best for a virtual machine to minimize crossing language boundaries" and M0 supplied "high-level constructs and conveniences, such as objects, lexical variables, classes and their associated syntax sugar". While the details are of course different I find dukeleto's description of MoarVM as "the spiritual successor to M0" apt.

        if MoarVM will ever run any Perl 6 code

        That's FUD.

        Update from 5 months later: Rakudo/MoarVM is already compiling the core setting -- which is 18K lines of non-trivial Perl 6 code -- and passing ~26k of ~28k spectests.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-07-25 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (169 votes), past polls