in reply to Re: RegEx Perl Code
in thread RegEx Perl Code

Perhaps you have examples where the gain is large - I've yet to encounter them.

jryan's benchmark code mentioned above can be tweaked with qr for a significant speed optimization. Change the line     my @patterns = ('B.B', 'CB')x10; to     my @patterns = map qr/$_/, ('B.B', 'CB')x10; in the &without subroutine.

Your benchmark doesn't show any support for compiled patterns, and that's due to an optimization I've already described here.

Cheers,
-Anomo