Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88960 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57724 invoked from network); 28 Oct 2015 06:21:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2015 06:21:23 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.52 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.213.52 mail-vk0-f52.google.com Received: from [209.85.213.52] ([209.85.213.52:34217] helo=mail-vk0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/72-30756-06960365 for ; Wed, 28 Oct 2015 01:21:21 -0500 Received: by vkgs66 with SMTP id s66so75716331vkg.1 for ; Tue, 27 Oct 2015 23:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=uh8IXLCTfgqi9wuIvwtgWlIzNpsL3PXhkcRz4fJI+gc=; b=WWMt1HRd0xU8/LEdNlZ2aFDuTXpHXW1jJScI8AhoLjkGgolC0rFQBZ0rxj0RTOK7U9 5COxf45oEkFdUbsF6I+3zVrTE2xbpJ2rVedFyc4FCySPUnLh7gqNCDQzs6BVphKfeE8J izcEX6IgRJ5MFggzm1lwSeFWe9ZYsa7B/4W5WMFDN0dYELTAx83STLzIhUarKtElh2Ls ilgZHT/wDx4SlK54tOzzaSax6ut2zRqW1TeDKchF3KB7cyqUPWCjRaxljs93MwxF5Ct+ pwxBkEUk4gP2kLcn5rHr3KcR7D4URJFoTZ+4Xk4SfWhrzDgad1Q81foZ2HuhaBQYqrbV g2yw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zend_com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=uh8IXLCTfgqi9wuIvwtgWlIzNpsL3PXhkcRz4fJI+gc=; b=rm6Y8dpLO9LBuc9aV99nVQZ32rTGPpqKAmoekGfeaZetwFtTAYV/L/qp+70DzCcv7/ 6Az4H87BiPnQ0QfkYz6VSDVTVIg2XA78nt35GvizU42jihsTrjxzQnV0BFVYej+YeYCY oKKb7HXvmPwdj6SnGAYKz9Uq5ufCM7P9RtNc0GfqiHf+lTtuJvlwnvgqCYHgbyA7O6ml lQ2rkZl9OF2XCD6Wct3lEiGKHwzx5/XUBAXEUDng6YXW6vpmb0AGH8CyDlU6S/Hjxt0b ZbZ3ORb7TePhn7F6vfPGUgL2ej2lF8ixgsDE6ukAqDOqLhb9BhQlegcyYVO8lJZqmcue HyDQ== X-Received: by 10.31.173.214 with SMTP id w205mr9161384vke.95.1446013278457; Tue, 27 Oct 2015 23:21:18 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.31.229.3 with HTTP; Tue, 27 Oct 2015 23:20:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Oct 2015 14:20:59 +0800 X-Google-Sender-Auth: LKGbLD34YqPAxXk26iAOyeNbbfo Message-ID: To: Bob Weinand Cc: Dmitry Stogov , Nikita Popov , PHP Internals Content-Type: multipart/alternative; boundary=001a1143924ecd94f90523243390 Subject: Re: Speed up fetching of class entries for self:: parent:: and static:: (Bob's idea) From: xinchen.h@zend.com (Xinchen Hui) --001a1143924ecd94f90523243390 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hey: On Wed, Oct 28, 2015 at 2:11 PM, Bob Weinand wrote: > > Am 28.10.2015 um 05:20 schrieb Dmitry Stogov : > > What is the general impression from the patch? > Should we commit it (with minor fixes and/or additional optimisations)? > Bob, do you see performance improvement on your app? > > Thanks. Dmitry. > On Oct 27, 2015 4:14 PM, "Dmitry Stogov" wrote: > >> Hi, >> >> Please take a look: https://github.com/php/php-src/pull/1604 >> The speed improvement on real-life is insignificant. >> VM size is increased by 10KB. >> >> I don't have a strong opinion, if this should go into master or not. >> >> Thanks. Dmitry. >> > > In general I like the patch, if only for the reason that it splits up the > monster zend_fetch_var_address_helper actually was into two helpers=E2=80= =A6 > > I benchmarked https://github.com/amphp/aerys/blob/master/lib/HPack.php wi= th > the following code: > > // Two example request headers from RFC 7541 > $data1 =3D hex2bin(str_replace(" ", "", "8286 8441 8cf1 e3c2 e5f2 3a6b a0= ab > 90f4 ff")); > $data2 =3D hex2bin(str_replace(" ", "", "8286 84be 5886 a8eb 1064 9cbf"))= ; > > for ($i =3D 0; $i < 1e5; $i++) { > $obj =3D new HPack; > $obj->decode($data1); > $obj->decode($data2); > } > > and got 6.27 vs. 6.01 seconds (4%). With the one or other optimization > (like mentioned in PR: not doing a zend_fetch_class() on each call, maybe > more), it'll be probably even more. > 4% is also a significant improvement. I 'd like to see it to be committed to master branch, we can keep do something opts base on this after it merged. thanks > > (I realize there's a lot overhead, but that's because I try to have a not > too synthetic benchmark; but at least these methods are the bottleneck of > most HTTP/2 traffic in this server app, so, if I can speed these up, it > will be significant.) > > Bob > --=20 Xinchen Hui @Laruence http://www.laruence.com/ --001a1143924ecd94f90523243390--