Schrift
[thread]8259[/thread]

aus array kommas löschen: hilfe ... (Seite 2)



<< |< 1 2 >| >> 12 Einträge, 2 Seiten
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
sid burn
 2006-08-23 21:32
#69126 #69126
User since
2006-03-29
1520 Artikel
BenutzerIn

user image
[quote=pq,23.Aug..2006, 17:21][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 =)[/quote]
Jetzt werde ich Ihn nicht mehr machen. ;)
Nicht mehr aktiv. Bei Kontakt: ICQ: 404181669 E-Mail: perl@david-raab.de
<< |< 1 2 >| >> 12 Einträge, 2 Seiten



View all threads created 2006-08-23 13:38.