$ perl match Rate orig lc orig 1492/s -- -7% lc 1608/s 8% -- $ perl match Rate orig lc orig 1506/s -- -7% lc 1620/s 8% -- $ perl match Rate orig lc orig 1492/s -- -8% lc 1627/s 9% -- #### use strict; use Benchmark qw(cmpthese); my $pattern = '(new|old|number|start|simple|cross|heavy|die|exit)'; my @words = qw( new Old Number start Simple Cross heavy die Exit ); my $string = join ' 0\4/f ', map( { rand $_ } 1 .. 60), map { $words[ rand @words ] } 1 .. 20; cmpthese (-2, { orig => sub { $string =~ /$pattern/i }, lc => sub { lc $string =~ /$pattern/ }, } );