[Purdue-pm] correction: Perl 5 reads lines 11.7 times faster
Mark Daniel Ward
mdw at purdue.edu
Sat Oct 22 19:35:02 PDT 2016
Dear Mark,
I look forward to Perl 6 continuing to get faster.
It is pretty neat to see Perl 6 getting better and better as time passes.
Thank you for always keeping us updated!
I'm still using Perl 5 but I know that someday I'll need to make the switch.
Mark
On 10/22/16 9:10 PM, Mark Senn wrote:
> The following is a correction to an earlier message I sent that was
> inspired by a message from Tom Browder to the perl6-bugs-followup
> mailing list. The biggest problem with the previous message from me was
> the subject line read "Perl 6 reads lines 11.7 times faster". Sheesh.
> | I ran the following Perl 5 and Perl 6 programs three times each and
> | averaged the results. The Perl 5 program read the one million line
> | file (each line was 99 x's followed by a newline) 11.7 times faster
> | than the Perl 6 program based on total execution times.
> |
> | Perl 5 program:
> | % perl --version
> | This is perl 5, version 22, subversion 0 (v5.22.0) built for
> | x86_64-linux-thread-multi
> | my $fn = '/tmp/mark/z';
> | open $fh, '<', $fn;
> | my $n = 0;
> | while (<$fh>)
> | {
> | $n++;
> | }
> | print "$n\n";
> |
> | Perl 6 program:
> | % perl6 --version
> | This is Rakudo version 2016.10 built on MoarVM version 2016.10
> | implementing Perl 6.c.
> | my $fn = '/tmp/mark/z';
> | my $fh = open $fn, :r;
> | my $n = 0;
> | for $fh.lines
> | {
> | $n++;
> | }
> | say $n;
> |
> | Perl 6 continues to get faster. I like it _much_ better than Perl 5.
> |
> | -mark
> | _______________________________________________
> | Purdue-pm mailing list
> | Purdue-pm at pm.org
> | http://mail.pm.org/mailman/listinfo/purdue-pm
> _______________________________________________
> Purdue-pm mailing list
> Purdue-pm at pm.org
> http://mail.pm.org/mailman/listinfo/purdue-pm
More information about the Purdue-pm
mailing list