Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88959 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55945 invoked from network); 28 Oct 2015 06:11:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2015 06:11:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.91 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.91 blu004-omc2s16.hotmail.com Received: from [65.55.111.91] ([65.55.111.91:63242] helo=BLU004-OMC2S16.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/12-30756-61760365 for ; Wed, 28 Oct 2015 01:11:34 -0500 Received: from BLU437-SMTP80 ([65.55.111.73]) by BLU004-OMC2S16.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 27 Oct 2015 23:11:31 -0700 X-TMN: [TdE2lSYC6V6b9QDE9OfCuDA+RTQ+WoPd] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_8FCB8C1D-0E21-4748-ABDE-637C8539AA77" MIME-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) In-Reply-To: Date: Wed, 28 Oct 2015 07:11:31 +0100 CC: Xinchen Hui , Nikita Popov , PHP Internals References: To: Dmitry Stogov X-Mailer: Apple Mail (2.3094) X-OriginalArrivalTime: 28 Oct 2015 06:11:29.0567 (UTC) FILETIME=[7C4482F0:01D11147] Subject: Re: Speed up fetching of class entries for self:: parent:: and static:: (Bob's idea) From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_8FCB8C1D-0E21-4748-ABDE-637C8539AA77 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" > 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? >=20 > Thanks. Dmitry. >=20 > On Oct 27, 2015 4:14 PM, "Dmitry Stogov" > wrote: > Hi, >=20 > 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. >=20 > I don't have a strong opinion, if this should go into master or not. >=20 > 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 = with the following code: // Two example request headers from RFC 7541 $data1 =3D hex2bin(str_replace(" ", "", "8286 8441 8cf1 e3c2 e5f2 3a6b = a0ab 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. (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= --Apple-Mail=_8FCB8C1D-0E21-4748-ABDE-637C8539AA77--