D. Bolliger am Mittwoch, 13. Dezember 2006 02:25:

Sorry for answering my own post...

[snipped]
> The script contains a testcase with "long" strings, it takes 1.2 secs on my
> old machine (the test case is certainly not a worst case scenario).
[snipped]
> ### Test case:
>
> my $pat=join '', 'hello' x 100;
> my $bar=join '', 'hello' x 99;
> my $foo=join '', 'a'     x 1000000;
[snipped]

With the following worser case test, 

my $baz=join '', 'hiho'  x10000;
my $pat=join '', $baz, 'hello' x 100;
my $bar=join '', $baz, 'hello' x 99;
my $foo=join '', 'a'     x 1000000;

execution time increases to... wait a sec ;-)... still running...

"If there's a module, use the module" ?

Dani




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to