On Sun Feb 16 22:30:14 2014, perl5-porters@perl.org 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 to: real 0m0.590s user 0m0.236s sys 0m0.176s Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=121259Thread Previous