develooper Front page | perl.perl5.porters | Postings from July 2010

Re: Patch to make string-append on win32 100 times faster

Thread Previous | Thread Next
From:
w.c.humann
Date:
July 30, 2010 14:26
Subject:
Re: Patch to make string-append on win32 100 times faster
Message ID:
4C534377.3030703@arcor.de
From: Marvin Humphrey <marvin@rectangular.com>
Date: 30.07.2010 17:34
>> * Why the "+10"?  Why have a extra minimum at all?  Why "10" instead
>> of another number?  Given your examples, for a large string the 10 is
>> a trivial fraction of the total and for a small string, the efficiency
>> either doesn't matter or the string quickly grows into a large string
>> anyway.
>>     
>
> That's similar to my analysis.  I think it's more useful to round up to a
> multiple of the pointer size for small values.
>   
If I understand correctly (which I'm not certain about), this is done 
anyway right afterwards in
newlen = PERL_STRLEN_ROUNDUP(newlen);

Wolfram


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About