Thread aus array kommas löschen: hilfe ... (11 answers)
Opened by Annka at 2006-08-23 13:38

pq
 2006-08-23 19:21
#69125 #69125
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
[quote=sid burn,23.08.2006, 16:07]Och würde ich nicht umbedingt sagen:

Code: (dl )
1
2
3
4
5
6
use Benchmark qw(:all);
my $string = 'Hallo, Welt blub blub, foo, bar.' x 10_000;
cmpthese( 10000, {
   'regex' => sub { $string =~ s/,//g; },
   'trans' => sub { $string =~ tr/,//d },
});
[/quote]
ich glaub, das ist der häufigste fehler, der bei benchmarks gemacht wird =)
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread aus array kommas löschen: hilfe ...