develooper Front page | perl.perl5.porters | Postings from October 2016

Re: [perl #129802]

Thread Previous | Thread Next
October 30, 2016 10:29
Re: [perl #129802]
Message ID:
On 30 October 2016 at 11:11, demerphq <> wrote:
> On 30 October 2016 at 10:30, demerphq <> wrote:
>> On 30 October 2016 at 09:57, demerphq <> wrote:
>> concat
>>    CUR = 65543
>>   LEN = 65544
>> Which does not leave enough room for the refcount. So a point fix
>> would appear to be to make sure that concat properly overallocates.
> Also, we need to remove the exemption for powers-of-2 rule, as it
> causes perf degradation too.

I have pushed

commit fe546b38f5a7481954f2f933acf85267578058b3
Author: Yves Orton <>
Date:   Sun Oct 30 11:02:57 2016 +0100

    fix #129802: sv_grow: remove the overallocation for COW exemption
for powers of 2

    They are just performance bombs waiting to hit the regex engine
    and other code. If someone wants this precise level of management
    then we should provide an API for them to do so.

    Really this just shows the flaw in our current COW implementation.

commit 7fdc4f5848180e5ae502e30ea783733d0da04086
Author: Yves Orton <>
Date:   Sun Oct 30 10:56:36 2016 +0100

    fix perl #129802 - overallocate in concat to ensure we can COW

    Otherwise we get degenerate performance in things like the regex
    engine under certain cases.

The first is potentially controversial. So it might get reverted. But
I consider this ticket closed/fixed.

perl -Mre=debug -e "/just|another|perl|hacker/"

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