Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Reasons for Using "Perl6" (don't need to earn a living?)

by Jenda (Abbot)
on Dec 23, 2017 at 03:24 UTC ( #1206092=note: print w/replies, xml ) Need Help??


in reply to Re^2: Reasons for Using "Perl6" (don't need to earn a living?)
in thread Reasons for Using Perl 6

If it were production-ready, some team would adopt it for production work. If you consider "there are no groups or organizations that have adopted "Perl6" other than hobbyist clubs" probably correct then you'd probably agree it's not seen as production-ready. Or even close enough to production-ready to start a longer project in hope it's going to get production-ready in time for the project to go to production.

I've seen several "all behold, I've made Perl 6 quicker" posts here on Perlmonks and while the message to stand in awe of claimed to have made Perl6 several times quicker, it was still at least two magnitudes slower than a matching Perl 5 solution.

Those two languages are different programming languages, but I would not consider them just siblings. They are more like a person and his atomic-waste-mutated brother with several extra limbs at weird places, odd number of eyes and many extra organs that nobody knows the purpose of.

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

  • Comment on Re^3: Reasons for Using "Perl6" (don't need to earn a living?)

Replies are listed 'Best First'.
Re^4: Reasons for Using "Perl6" (don't need to earn a living?)
by Laurent_R (Canon) on Dec 23, 2017 at 11:24 UTC
    Yes, Perl 6 is generally slower than Perl 5, this has not been denied by any one. But very significant improvements have been made and more are to come.

    Two orders of magnitude? This is a factor of 100. So you're saying that Perl 6 is at least 100 times slower. Let's see.

    This is a very simple benchmark on a loop:

    C:\Users\Laurent>perl -E "my $c = 1; my $start = time; while (1) { $c+ ++; last if (2 * $c ) > 50000000 ; }; say time - $start; say $c" 4 25000001 C:\Users\Laurent>perl6 -e "my $c = 1; my $start = time; while (1) { $c +++; last if (2 * $c ) > 50000000 ; }; say time - $start; say $c" 21 25000001 C:\Users\Laurent>perl6 -e "my int $c = 1; my $start = time; while (1) +{ $c++; last if (2 * $c ) > 50000000 ; }; say time - $start; say $c" 9 25000001
    So here, the first Perl 6 test took 21 seconds, which is a bit more than 5 times slower than Perl 5. That's not anywhere near two orders of magnitude. Just adding the int hint (no pun intended) for the compiler to optimize its handling of the integer variable led to 9 seconds, so that, in the last test, Perl 6 is about 2.25 slower than Perl 5. I wish it were not so, but that's where we stand. There is definitely room for improvement. A year ago, or so, it might have been slower by a factor of 10. What will it be in a year from now? I really don't know, but performance improvements are being made almost every single week, so it is likely to improve significantly.

    And, BTW, I know the results are low resolution, but that's not a Perl 6 limitation: Perl 6 has a built-in now function giving a much higher resolution:

    C:\Users\Laurent>perl6 -e "my int $c = 1; my $start = now; while (1) { + $c++; last if (2 * $c ) > 50000000 ; }; say now - $start; say $c" 8.9252329 25000001
    For some other computations, Perl 6 will slower than Perl 5 by a significantly higher margin, perhaps 10 to 20 times, but, again, it is improving all the time.

    Also, look at the Perl 5 and Perl 6 pieces of code: can anyone say that these languages are not closely related?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1206092]
help
Chatterbox?
and the questions are moot...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2018-07-17 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (379 votes). Check out past polls.

    Notices?