http://qs321.pair.com?node_id=1126549


in reply to Perl6 Regex extremely slow

It is so slow to parse that I am using the Perl5 m:P5 prefix to be able to parse in a reasonable amount of time.

Rakudo uses the same regex engine, regardless of whether you use :P5 or not.

But as mentioned before, the regexes don't do the same thing. Why use ^^ (begin-of-line) vs ^ (begin-of-string), for one? With ^^, the regex engine has to scan the entire string for newlines, with ^, it can immediatly know there's no match if the first attempt at matching failed.

Also, when talking about "slow", it helps to provide some numbers, both for run time and length of the input strings. Rakudo's regex engine is known to be slower than Perl 5's, but without anything concrete to look it, it's impossible for us say what's wrong.