I have Perl on a Apple M1 Max Mac laptop (2021) and a Core i9 Mac laptop (2018). I assumed Perl compiled for arm64 would run much faster than Perl for x86_64.
With regex, it doesn't seem to be the case. The one-liner I used was time perl -e '$n = shift; $na = "a" x $n; print $na =~ /(a?){$n}a{$n}/' X where X ranges over 5,10,15,20,24,30 etc.
Results graphed at sandiway.arizona.edu/temp/538/perl%20comparison.png
EDIT: direct link
In reply to Perl regex speed by malaigo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |