Out of the mouths of dab'es ! Isn't this a 'sexeger' situation?
Maybe someone should check my results, 'cuz I can't believe that adding in the reverse's doesn't impact these timings more. I added a different routine to the mix benchmarked by antirice:
sub badkcams {
$a = reverse $s;
$a =~ s[\cH[^\cH]|\cH$][]g while 1+index $a, chr(8);
reverse $a;
}
I then ran the benchmark again:
Rate smack new1 uk badkcams
smack 191/s -- -96% -97% -97%
new1 5063/s 2547% -- -7% -25%
uk 5469/s 2759% 8% -- -19%
badkcams 6715/s 3411% 33% 23% --
Rate smack new1 uk badkcams
smack 42.4/s -- -22% -30% -44%
new1 54.7/s 29% -- -9% -27%
uk 60.2/s 42% 10% -- -20%
badkcams 75.3/s 78% 38% 25% --
Am I reading this right? It's faster?!?
(This is Perl 5.8.0 AS build 806 running on WinXP.) |