3 ms·
Plenty of applications where speed really doesn't matter. Those will be the beach head, and as use grows, speed will grow too.
by peteretep 8y ago
Plenty of applications where speed really doesn't matter. Those will be the beach head, and as use grows, speed will grow too.
- cutler 8y agoThere's no correlation between popularity and speed growth. Perl6 should never have been released in its current state.
- lizmat 8y ago> Perl6 should never have been released in its current state. It wasn't released in its current state? In fact, quite a lot was improved in the past 2.5 years. Not sure where you're getting at.
- cutler 8y agoI'm getting at the fact that it's 9 times slower than Perl 5 at doing something which made Perl famous - parsing files with a regex. Perl 6 seems to have thrown away the basics of Perl while trying to be all things to everyone.
- lizmat 8y agoAt this point in time, I wouldn't recommend parsing files with a regex just yet. Parsing is indeed one of the few areas in Perl 6 that hasn't seen any specific optimizations yet. Where Perl 6 has seen a lot of work, is general performance, and specifically in the part of concurrency. Where the common idiom for grepping lines using a lazy iterator and showing the matching lines from a file in Perl 6 is: .say for $filename.IO.lines.grep( { m/foo bar/ } ); You can spread this out over multiple CPU's by simply adding the word `hyper` to it. .say for $filename.IO.lines.hyper.grep( { m/foo bar/ } ); On most current hardware (4 x 2 hyperthreaded CPU's) this would cause this code to run 3x as fast, while keeping order. If you're not interested in order, you can use `race`: .say for $filename.IO.lines.race.grep( { m/foo bar/ } ); Which will make it go a little faster still because it won't need to remember the order of the batches of work. Jonathan Worthington explained this quite well in this blogpost: https://6guts.wordpress.com/2017/03/16/considering-hyperrace-semantics/ https://6guts.wordpress.com/2017/03/16/considering-hyperrace... So, yes, at this time, that particular job is done 9x faster with Perl 5 than it is with Perl 6. If you don't need any specific features of Perl 6, I'd suggest you keep using Perl 5 for that. Whether this answer will continue to be correct in the future? Time will tell.
- cutler 8y agoWrong priorities then. I also doubt this will ever be fixed. Perl 6 is just unacceptably slow at the basics. I mean if Perl 6 had been rushed out I would find these excuses more acceptable but after 15 years in development!?
- lizmat 8y agoThese are not excuses. These are facts. Whether the facts are excusable, I'm leaving for the reader to decide. One could argue that Perl 6 is the first version of Perl that wasn't rushed out, BTW.
- b2gills 8y agoSomeone once posted Perl 6 code and C/C++ code that were equivalent. They said that the Perl 6 version was faster than the C version. My guess is that the C/C++ was copying strings where MoarVM didn't.
- deleted 8y ago[deleted]