Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73907 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34320 invoked from network); 5 May 2014 15:26:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 May 2014 15:26:52 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:58393] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/A7-23541-ABDA7635 for ; Mon, 05 May 2014 11:26:51 -0400 Received: from [10.164.132.114] (unknown [144.24.19.7]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 9EA4A466DF; Mon, 5 May 2014 17:27:43 +0200 (CEST) To: Dmitry Stogov Cc: Andrea Faulds , Andi Gutmans , PHP Internals In-Reply-To: References: <1CB4131A-13AA-4061-94F6-CA3B3EB1DB3E@ajf.me> <5FB10F5A-C78A-47C7-ABD1-A1CA1426B122@ajf.me> <0B48F9CB-D504-4274-8CE9-B330A4EDC4BD@zend.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-fvYHixLAjjZyv0dM83yt" Date: Mon, 05 May 2014 17:26:21 +0200 Message-ID: <1399303581.3137.9.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Subject: Re: [PHP-DEV] phpng: Refactored PHP Engine with Big Performance Improvement From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) --=-fvYHixLAjjZyv0dM83yt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, 2014-05-05 at 18:31 +0400, Dmitry Stogov wrote: > I'm doing it right now: https://wiki.php.net/phpng-int I haven't looked deeply into it, but a thing I wondered about old zvals already: CELL Format (zval) +--------------------------------------------------------------------------= --------+ | VALUE (64-bit) = | +--------------------------+-------------+-------------+-------------+-----= --------+ | UNUSED (32-bit) | UNUSED | const_flags | type_flags | TYPE= | +--------------------------+-------------+-------------+-------------+-----= --------+ 63 32 31 24 23 16 15 8 7 = 0 Have you tried movin the TYPE to the einning of the structure? - I assume checking/setting the type is the most common operation. By moving it upfront the address of the type equals the address of the zval, thus the CPU should be ale to access it without offset, might improve pipeline throughput. I haven't measured that, but miht be interesting while already chaning this. johannes --=-fvYHixLAjjZyv0dM83yt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (SunOS) iQEcBAABAgAGBQJTZ62dAAoJEH3sTmn8nIPXy1cIAL+/+l/Dera/dIkf3v1+qqTh aV8gGrAfwwxx6JkSr6mpLNck2U4WSNWr52gApNxVQE+8k3zzNCY2fvySv7p3+9sD qMZfGtMHaD6UHadtUfc3d5uhXacZDySqVqQunIONQJj093QIg2kbolvVD+S259oU 76KMr9Gh01UpoLBWH+ECDnICbKisn+iZ40iKMEWSItpnuCWIEDRUOkaz+fDAhMK7 xwqADjlR5miWY/2zlT8D4xxwGLt3XvD2I67AbH0eG79er6qYLif4x0ypdtK49yCd Yg6i7SHIeN9Wtg5mfTXRpbfQfycMSAEtjxb+NkQ9ePCacoU2RLDNCN3HkGQUM00= =ZjU1 -----END PGP SIGNATURE----- --=-fvYHixLAjjZyv0dM83yt--