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

[perl #121259] Slow global pattern match on specific large utf8 input

Thread Previous
Tony Cook via RT
February 20, 2014 22:36
[perl #121259] Slow global pattern match on specific large utf8 input
Message ID:
On Sun Feb 16 22:30:14 2014, wrote:
> I wrote:
> > Now, why is the buffer that small?  I thought we were allocating an
> > extra byte for the sake of copy-on-write.
> The extra byte is not added if we happen to have a nice large power
> of two.  Since sv_gets is allocating the string here (the assignment
> is optimised away and the input is read straight into $input), we can
> simply add a byte there, since we know we do not need a power of two.
> Please try the sprout/121259 branch.  It seems to work for me.  (I
> still need to write a real commit message and comment the code.)

This fixed the performance for me, from:

real    3m58.732s
user    3m56.659s
sys     0m0.796s


real    0m0.590s
user    0m0.236s
sys     0m0.176s


via perlbug:  queue: perl5 status: open

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About