5 ms·
How fast is Perl 6 nowadays?
by visarga 11y ago
How fast is Perl 6 nowadays?
- rurban 11y agoFaster than Perl5 with Moose, but slower than similar languages with similar features. But there are not many with this impressive feature set.
- stesch 11y agoWith all these different implementations how hard is it to access C libraries and/or make modules that use C?
- cygx 11y agoAs simple as writing a Perl6 signature for your C function. A proper solution for deploying your own libraries has yet to arrive (you can look up library names at runtime and compile code via the module manager, but imo it's still rather ad-hoc).
- hahainternet 11y agoNot very (hard): https://github.com/jnthn/zavolaj https://github.com/jnthn/zavolaj
- Geert_Wilders 11y agoperl6 is gay
- perlgeek 11y agoNot very difficult, see http://doc.perl6.org/language/nativecall http://doc.perl6.org/language/nativecall
- chrisseaton 11y agoShame it's slower than existing work. We know pretty well how to optimise dynamic languages these days.
- Mithaldu 11y agoYou overlook the addendum in the parent post.
- chrisseaton 11y agoI don't think so - it's still 'slower than similar languages with similar features', so not sure what difference it makes that there aren't many languages to compare against, if when we do compare it's still slower. I'd be interested to see what features there are that make the system slower in general, even when they aren't being used. I did a lot of work in my PhD on making odd features not affect the performance of Ruby code when they aren't being used. Do you know what they are?
- Mithaldu 11y agoNot directly, sadly. I can make an educated guess though, since Perl 5 has since adopted many of the features thought up for Perl 6. Particularly try looking at its OO features, in regards to roles, parametrized roles, reflection and automated attribute/constructor creation. I can't say with confidence, but i suspect the number of languages having all those features is very low, if existent, and the number of languages with some of these features is also low. Do note that you will have to look closely and follow references to make sure you have a full picture of understanding, since at first glance many of them seem simple, but turn out to offer considerable depth. http://doc.perl6.org/language/objects http://doc.perl6.org/language/objects
- justinator 11y agoI'm not sure if Perl 5 has adopted these features, but these features have been implemented in Perl 5 via modules [0], which is excellent - but sadly, this is vastly different than being in core, or even having the modules in core. I don't even think you can set default attributes in Perl 5 methods. You still have to pass around the object, shift it off - a whole lot of boilerplate. Something as simple as that has been proposed, but it's not been in production for Perl 5. (without Moose and friends, of course) Really, there hasn't been a terrible amount of new features in Perl 5 - and certainly not a new model for OO. Moose is great! And the constant release of CPAN modules is also wonderful, but the core of Perl 5 is full of dragons, which makes backporting features from Perl 6 hard to do in core - and perhaps a good argument can be made against doing that. Example: Moose is a very successful project, but thee given/when statement in the core of Perl was a failure. [0] http://moose.iinteractive.com/en/ http://moose.iinteractive.com/en/
- peteretep 11y agoDo you have a link to benchmarks you'd recommend that show it being faster than Perl5 with Moose?
- mj41 11y agoI know about startup time: https://gist.github.com/mj41/6761c021135ae1cb17f9 https://gist.github.com/mj41/6761c021135ae1cb17f9 BTW: Not Moose related - loop with native int: https://gist.github.com/mj41/20c70566564283151714 https://gist.github.com/mj41/20c70566564283151714
- rurban 11y agohttp://perlformance.net/charts/ http://perlformance.net/charts/ is the usual pointer, but it has no easy to show comparison. There's also the perl6 specific benchmark https://github.com/japhb/perl6-bench https://github.com/japhb/perl6-bench but I have no idea where they post their results to. It used to be a gist or IRC.
- smegel 11y agoIs JIT going to be on the horizon (sorry didn't watch the full video)?
- cygx 11y agoIt's already there on x64. Note that to fully take advantage of it, the optimization layer above it that does type specialization also needs work (eg some optimizations were lost during the 'Great List Refactor', a semantic change that was set as one of the blockers for the 6.0 release).
- sigzero 11y agoAnd they really haven't done any optimizations for speed yet. Larry mentions that in his talk.
- rurban 11y agoExcuse me? The whole 2 last years was mostly spent on MoarVM and it's optimizations. That's why we are having this release in the first place.
- dragonwriter 11y ago> Faster than Perl5 with Moose, but slower than similar languages with similar features. But there are not many with this impressive feature set. Which languages with "similar features" are you comparing to Perl 6 here, and (given the second sentence) are the feature sets really similar?