## this 5.10 [0]{} Perl> cmpthese -1,{a=>q[ 1 while $s =~ m[((?=(.))\2+)]sg;],b=>q[1 while $s =~ m[((.)\2*)]sg;] };; Rate a b a 204/s -- -4% b 212/s 4% -- [0]{} Perl> cmpthese -1,{a=>q[ 1 while $s =~ m[((?=(.))\2+)]sg;],b=>q[1 while $s =~ m[((.)\2*)]sg;] };; Rate a b a 204/s -- -4% b 212/s 4% -- [0]{} Perl> C:\test>\Perl22\bin\perl.exe \Perl22\bin\p1.pl [0]{} Perl> $s = join'', map{ chr( 65+rand(26) ) x rand( 100 ) } 1 .. 1000;; [0]{} Perl> cmpthese -1,{a=>q[ 1 while $s =~ m[((?=(.))\2+)]sg;],b=>q[1 while $s =~ m[((.)\2*)]sg;] };; Rate a b a 229/s -- -3% b 235/s 3% -- [0]{} Perl> cmpthese -1,{a=>q[ 1 while $s =~ m[((?=(.))\2+)]sg;],b=>q[1 while $s =~ m[((.)\2*)]sg;] };; Rate a b a 229/s -- -4% b 238/s 4% --