Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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
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 taking refuge in the Monastery: (4)
As of 2020-06-07 02:08 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (41 votes). Check out past polls.