Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl6 Regex extremely slow

by moritz (Cardinal)
on May 13, 2015 at 13:12 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1126549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-16 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found