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


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

FWIW, perl6 -ne 'say ~$0 if m/(<<\w**5>>)/' … is much faster. Something likely needs to be optimized in Match.gist. It's still much slower than Perl 5

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

    Additionally, appending  for lines gives a significant gain over using -n, so that needs works as well.

    EDIT: I agree that '-n' should be what is used here, I was moreso posting in the interest of figuring out why that's so slow. I just made a PR which seems to bring the time for '-n' to be more like that of 'for lines'

      It could be argued you're then comparing different things. The original is strictly a comparison of the equivlaent Perl one-liners.

        They are not quite equivalent. say $0 actually dumps the whole match tree of that capture (something that doesn't even exist in Perl 5), it just happens to be a single string in this case. Still the code that is behind it is must consider the general case.

        It shouldn't make such a big difference, though.