Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Perl6 Regex extremely slow

by moritz (Cardinal)
on May 13, 2015 at 13:12 UTC ( #1126549=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1126549]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2022-12-10 08:04 GMT
Find Nodes?
    Voting Booth?

    No recent polls found