On Mon, Oct 30, 2017 at 4:09 PM, Sara Golemon wrote:
> On Mon, Oct 30, 2017 at 6:51 AM, Dmitry Stogov wrote:
> > The optimization also broke Zend/tests/bug72598.phpt and
> Zend/tests/bug72598_2.phpt
> >
> Damn. I had a feeling references would rear their ugly head here.
>
> Fuggit, reverted. W
On Mon, Oct 30, 2017 at 6:51 AM, Dmitry Stogov wrote:
> The optimization also broke Zend/tests/bug72598.phpt and
> Zend/tests/bug72598_2.phpt
>
Damn. I had a feeling references would rear their ugly head here.
Fuggit, reverted. We can take another swing at it later, but it's not
a vital optimi
-DEV] Apply substr() optimization to array_slice()
On Fri, Oct 27, 2017 at 12:10 PM, Nikita Popov wrote:
> On Fri, Oct 27, 2017 at 4:16 PM, Sara Golemon wrote:
>>
>> On Fri, Oct 27, 2017 at 8:12 AM, Benjamin Coutu
>> wrote:
>> > Now, array_slice() could be opti
: Nikita Popov
Date: Fri, 27 Oct 2017 18:34:15 +0200
Subject: Re: [PHP-DEV] Apply substr() optimization to array_slice()
>
>
> On Fri, Oct 27, 2017 at 12:10 PM, Nikita Popov wrote:
> > On Fri, Oct 27, 2017 at 4:16 PM, Sara Golemon wrote:
> >>
> >> On Fri, Oct 27
On Fri, Oct 27, 2017 at 12:10 PM, Nikita Popov wrote:
> On Fri, Oct 27, 2017 at 4:16 PM, Sara Golemon wrote:
>>
>> On Fri, Oct 27, 2017 at 8:12 AM, Benjamin Coutu
>> wrote:
>> > Now, array_slice() could be optimized similarly, but currently
>> > (unless the resulting array is expected to be empt
On Fri, Oct 27, 2017 at 4:16 PM, Sara Golemon wrote:
> On Fri, Oct 27, 2017 at 8:12 AM, Benjamin Coutu
> wrote:
> > Now, array_slice() could be optimized similarly, but currently
> > (unless the resulting array is expected to be empty) we always
> > create a new array no matter if we actually ha
On Fri, Oct 27, 2017 at 8:12 AM, Benjamin Coutu wrote:
> Now, array_slice() could be optimized similarly, but currently
> (unless the resulting array is expected to be empty) we always
> create a new array no matter if we actually have to.
>
Pushed, with an additional escape hatch for vector-like
Hello Benjamin,
Am 27.10.2017 um 14:12 schrieb Benjamin Coutu:
> Hello everyone,
>
> Please consider these two statements:
>
> substr($string, 0, $length);
> array_slice($array, 0, $length, true);
>
> Currently, with substr(), if $offset is zero and $length is smaller or equal
> to the origina
Hello everyone,
Please consider these two statements:
substr($string, 0, $length);
array_slice($array, 0, $length, true);
Currently, with substr(), if $offset is zero and $length is smaller or equal to
the original string length we just increase the reference count of the original
string and r