##
(around)
(aroun)(d)
(arou)(nd)
(arou)(n)(d)
...
####
(around)
####
my $s = q("You spin me ""around"" and ""around"", ""round"", like a record, ""round"" and ""around"".);
use Benchmark 'cmpthese';
cmpthese(-3, {
cut => sub { return $s =~ /"(?>[^"]+|"")*"(?!")/ },
straight => sub { return $s =~ /"(?:[^"]+|"")*"(?!")/ }
});
####
Rate straight cut
straight 7579/s -- -89%
cut 69921/s 823% --