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

Re: [perl #129802]

Thread Previous | Thread Next
From:
demerphq
Date:
October 30, 2016 10:29
Subject:
Re: [perl #129802]
Message ID:
CANgJU+WVtz=BTFqVkdwvaLQhae6W3S_ME2QHNf2--6zyTW+rkg@mail.gmail.com
On 30 October 2016 at 11:11, demerphq <demerphq@gmail.com> wrote:
> On 30 October 2016 at 10:30, demerphq <demerphq@gmail.com> wrote:
>> On 30 October 2016 at 09:57, demerphq <demerphq@gmail.com> 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 <demerphq@gmail.com>
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 <demerphq@gmail.com>
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.

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

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