develooper Front page | perl.perl5.porters | Postings from June 2014

Re: [perl #121734]

Thread Previous
From:
Jarkko Hietaniemi
Date:
June 5, 2014 01:47
Subject:
Re: [perl #121734]
Message ID:
538FCC26.1050906@iki.fi
On Wednesday-201406-04, 21:22, Jarkko Hietaniemi wrote:
> I've got a better idea than futzing with the futz factor.  Just a minute.

So try the attached patch.  Instead of baking in a futz factor (which 
some system apparently just out-futzed) this tries divining the 
appropriate numbers using the NULL-buffer-zero-count feature of 
strxfrm(), where no actual output is done, only the required length is 
returned.

NOTE 1: if the expansion factor of 50 really is not enough, this means 
that for strxfrm() of input of N bytes, Perl will reserve a buffer of 
more than 50 N...

NOTE 2: now that I think of it, if the strxfrm() count-only feature 
really works (see above), then the PL_collxfrm_base and PL_collxfrm_mult 
can be deprecated as such.





Thread Previous


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