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.