Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67423 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16935 invoked from network); 14 May 2013 05:43:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 May 2013 05:43:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.128.171 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.128.171 mail-ve0-f171.google.com Received: from [209.85.128.171] ([209.85.128.171:46386] helo=mail-ve0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/33-55400-5FEC1915 for ; Tue, 14 May 2013 01:43:18 -0400 Received: by mail-ve0-f171.google.com with SMTP id m1so100257ves.30 for ; Mon, 13 May 2013 22:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=bDrUw89+OO5jJrcVUV40tYiOsnIwN1WRaOMk1Pqwirw=; b=eWjavJKP7imP1/XvuFuqN6u1RIrIMi5mpQhOzWJMlmEJVLvF9zK/vgN1y1qFpSVqic ZbcF6VDquvAEj6udWeKMgtiYPF4U3ZjN6Y9LOYSDBepaiho3bB69Svt33+mbO5R3xQgW 0PpVlH2MM/SFxpfwNH5w5jI6XHOhiajFjta986HPwZuLAx7qkIRgg3sW4gK72/hvGeSe FD6YPmvCYgT7ubbkfVCVy6ZBrpGEUEWFZUjCgvjesa/AW84uJo9istdP7on1fCIZzXw0 lRgLWgDtv92lrV+z6W4QITWGULUa8iqavmnJ4VBYs2sM4VXEhcz9hp+ZYu0UvDaGUKwZ Ynig== MIME-Version: 1.0 X-Received: by 10.220.71.200 with SMTP id i8mr20442971vcj.44.1368510195126; Mon, 13 May 2013 22:43:15 -0700 (PDT) Received: by 10.52.67.235 with HTTP; Mon, 13 May 2013 22:43:15 -0700 (PDT) In-Reply-To: References: Date: Tue, 14 May 2013 09:43:15 +0400 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c234480d872004dca71c24 X-Gm-Message-State: ALoCoQlSmq30HbHpjXoe3wy32voN/Q5M2JqMUgX4L8FFrXx2azjQtkeMzyd44TvvfXzfXXwUPSc2KX0SAKdkBCPnkth4vI08+Q2g2AS/v+RPDLWW9Xg1U5fUptqkU4a2FfrFJJqlqUwa Subject: Re: [PHP-DEV] [RFC] Internal operator overloading and GMP improvements From: dmitry@zend.com (Dmitry Stogov) --001a11c234480d872004dca71c24 Content-Type: text/plain; charset=UTF-8 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 wrote: > On Mon, May 13, 2013 at 1:09 PM, Dmitry Stogov 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 > --001a11c234480d872004dca71c24--