http://qs1969.pair.com?node_id=1099627


in reply to Re: Rakudo Perl 6 and MoarVM Performance Advances
in thread Rakudo Perl 6 and MoarVM Performance Advances

That's not great indeed. I don't really hope this will make much of a difference, but you did not have to capture the match with parenthesis. You could have just used $/:

perl6 -n -e 'say $/ if m/<<\w**5>>/' logs.txt

On the other hand, even if this does make a difference, the optimizer should have converted it automatically.

Replies are listed 'Best First'.
Re^3: Rakudo Perl 6 and MoarVM Performance Advances
by gunzip (Pilgrim) on Sep 05, 2014 at 06:37 UTC

    Perl 6 now 2 mins. 20 seconds. For the record Ruby 2.1:

    ruby -wnl -e 'puts $1 if /\b(\w{5})\b/' logs.txt

    ... completed in 2 seconds.