5 ms·
What does MoarVM do with your Perl 6 code?
- sciurus 12y agoFor more on MoarVM see http://moarvm.org http://moarvm.org According to http://perl6advent.wordpress.com/2014/12/01/the-state-of-perl-6-in-2014/ http://perl6advent.wordpress.com/2014/12/01/the-state-of-per... "In 2014, MoarVM has become the de facto standard backend for the Rakudo Perl 6 compiler. Parrot and JVM are still supported as backends, but MoarVM provides much lower memory usage, faster startup time, and is significantly faster than parrot at runtime. Rakudo on MoarVM also has concurrency support, including reactive programming."
- Diederich 12y agoThe MoarVM folks are moving very quickly and achieving amazing results. Many kudos to them.
- DonHopkins 12y agoWasn't MoarVM actually an April Fools Day joke, or do I have it confused with something else?
- chadzawistowski 12y agoYou might be thinking of ParrotVM. Guido van Rossum and Larry Wall had an April Fool's joke in which they announced they would combine Python and Perl into a single new language, "Parrot". In spirit with the joke, ParrotVM strives to be a good target many dynamic languages in general (such as Perl and Python) rather than any specific language.
- sciurus 12y agoI was curious what happened to Parrot; it seems dead at this point. https://www.openhub.net/p/parrot/commits/summary https://www.openhub.net/p/parrot/commits/summary
- kbenson 12y agoNot dead entirely to my knowledge, it still gets some commits, mostly by Rakudo devs to tweak it so Rakudo still works on it, and rurban who is putting time in to actually move it forward (but he's only one man, and I believe he's got a rather high count of VM's he's the main contributor to at this point, so I don't know how much attention he has to spare).
- chromatic 12y ago[W]hat happened to Parrot Almost all of its developers quit around the same time: http://www.modernperlbooks.com/mt/2013/02/goodnight-parrot.html http://www.modernperlbooks.com/mt/2013/02/goodnight-parrot.h...
- DonHopkins 12y agoSomebody finally explained to them that Parrot was actually a joke, and nobody was actually serious about Perl 6 either.
- viraptor 12y agoIt's not dead, it's just resting!
- JadeNB 12y agoThat was a thing of beauty. How often can one hope for such a set-up?
- petercooper 12y agoThe simple program: my $i = 0; while ++$i <= 100000000 { } .. got a factor of 2.5 improvement with what we had several months ago If the topic is optimization improvements, is the improvement in question one that assigns the eventual value directly to $i? :-) (Or if that's literally the whole program, optimizes it away to nothing.)
- chrisseaton 12y agoIt's quite hard to remove that loop. First of all, keep in mind that the loop isn't empty - it includes the iteration condition. Then think you've got a loop of 100000000 iterations. Are you suggesting we should unroll that so that it can be constant folded using conventional techniques? That's going to be prohibitively expensive in terms of space and time. If we can't unroll we could peel it an iteration at a time, but we'll need some kind of analysis that will detect that the body of the loop can be constant folded, while at the still time having the control flow nodes in there. That might well be possible, but I'm not personally aware of how to do it - are you?
- petercooper 12y agoAs I'm academically naive to the topic (though I have a long term interest) I was being 50% tongue in cheek and 50% "well, why not?" so take my comments in my capacity as an enthusiastic but ignorant buffoon basking in the presence of a certified genius. With that said, I wrote the C equivalent of that Perl code, compiled -O0, disassemble, and it's what you'd expect.. add, mov, cmp, jg. At O3, the entire program is replaced by the no op: xor eax, eax. I am surely comparing apples and oranges here and missing your point about the control flow nodes, but gcc is making such an optimization on a naive implementation so it seems conceptually possible in a more dynamic environment if the same limitations can be calculated to be present on such an example, maybe?
- viraptor 12y agoIn a fairly dynamic language, it may be more problematic than in C. I mean in C you know i is an int and will not change. Maybe even know it's not used later on, so changing i at all is useless. I honestly don't know how much magic you can inject into Perl6, but there have to be languages dynamic enough that allow you to override integer increments and make $i=10; ++$i return an array of oranges. Possibly even from another thread while you're iterating.