Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl regex speed

by jwkrahn (Abbot)
on Oct 25, 2022 at 08:08 UTC ( [id://11147674]=note: print w/replies, xml ) Need Help??


in reply to Perl regex speed

You have a seriously bad regular expression. I don't see how it could be improved by running on a different architecture.

Try running it like this:

perl -Mre=debug -le'$n = shift; $na = "a" x $n; print $na =~ /(a?){$n} +a{$n}/'

Replies are listed 'Best First'.
Re^2: Perl regex speed
by malaigo (Novice) on Oct 25, 2022 at 21:47 UTC
    You don't understand. This is for teaching. It's supposed to be a worst case scenario for backtracking regex implementations. The question is how come the arm64 version doesn't blow away the x86 one.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found