Hi Nikita,

Few final notes:

- I wouldn't change zend_object_compare_t into
zend_object_compare_objects_t. It would be better to name the new function
as zend_object_compare_zvals_t. (It's just for better backward
compatibility)

- Increment and decrement operators in PHP may have different semantic than
+=1, but I it's probably OK to use ADD/SUB for them.

- In some cases you insert call to zend_object_do_operation into the most
probable path (e.g. in mod_function). This would cause at lease 2
additional comparisons and may be conditional jumps. I think it would be
better to check for most probable operand types first...

I didn't look into GMP part.

Thanks. Dmitry.


On Mon, May 13, 2013 at 8:16 PM, Nikita Popov <nikita....@gmail.com> wrote:

> On Mon, May 13, 2013 at 1:09 PM, Dmitry Stogov <dmi...@zend.com> wrote:
>
>> Hi Nikita,
>>
>> I didn't get why do we need separate zend_std_compare() function.
>> May be I just didn't look careful :)
>>
> Good point, that was not really necessary. I moved the code back into
> compare_function.
>
>
>> It would be great to look into the patch between master and current of
>> your branch.
>>
> You can find a diff between master and my branch on the PR:
> https://github.com/php/php-src/pull/342/files
> The relevant diff for the compare handler is here:
> https://github.com/php/php-src/pull/342/files#L2R1581
>
> Nikita
>

Reply via email to