use Benchmark 'cmpthese';
use Regexp::Keep;
my $s = "abc.def.ghi.jkl";
cmpthese(-5, {
japhy => sub { (my $x = $s) =~ s/.*\K\..*// },
old => sub { (my $x = $s) =~ s/(.*)\..*/$1/ },
});
####
old = 40280.54/s
japhy = 74338.79/s
####
old = 58188.18/s
japhy = 102409.25/s