Rate l3epost l3epre l3ipost l3ipre l3epost 42.2/s -- -3% -8% -10% l3epre 43.4/s 3% -- -5% -8% l3ipost 45.8/s 9% 6% -- -3% l3ipre 47.1/s 12% 9% 3% -- #### use strict; use Benchmark qw/ cmpthese /; our $a = "abcdefghij" x 1000; cmpthese(-1, { l3epost => q{ my %a; $a{$1}++ while $a =~ /(?=(.{3}))/g }, l3epre => q{ my %a; ++$a{$1} while $a =~ /(?=(.{3}))/g }, l3ipost => q{ my %a; $a{$1}++ while $a =~ /(?=(...))/g }, l3ipre => q{ my %a; ++$a{$1} while $a =~ /(?=(...))/g }, });