Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1126549]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2018-04-20 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?