Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73910 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53741 invoked from network); 5 May 2014 18:01:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 May 2014 18:01:34 -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.212.174 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:49939] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/E0-44049-CF1D7635 for ; Mon, 05 May 2014 14:01:33 -0400 Received: by mail-wi0-f174.google.com with SMTP id r20so2668530wiv.13 for ; Mon, 05 May 2014 11:01:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xFduvAOQG1VZw3XA/MnZn7L5I+HNOFitF+qyB/vomFQ=; b=e6Jxk2lsLjti0NDdCDCwzpd4Vx31H9/frEl1DcbeiR6v4+psRpa3u4zIkhYMkA5IVn +3CePUw/J4G+B4+1d8f6hyuO7qQf2IfiUC71hazkEFg2voH+L6KtNmkm9JezTKBTLuOr 8kbYYQELtGNsCguS2U4dr24dGKSexPtFe8kzPTy6qtJPImbt1eMBC7Ev9sb8KF4Aks64 9x6lHA2/6GCAjEsjaXiuOgi4Jj0BaB7K7Y2P+SftqOQHMBu2wehW6bzuQHUUYqaV2AjO sb/D1bsaD3myCXd6XM1Fhm2ZNRFmVU/DiwW03enuA+GgnRS+aw/8Ry6GvqmjX4zsJ2Dr iaYw== X-Gm-Message-State: ALoCoQnNYhSyz0P5np+WrcUEjPEEc64tGyNm4kn43HaQgkOxYYncy0R0MyBsfTqaB0tWqPyzxHctlgJeZSnd1UxA/3u6XPHNxlxoEjzlYZ0XJ3iMd31wV20JdiOlB3mTLcVBHaBqUE1c MIME-Version: 1.0 X-Received: by 10.194.63.196 with SMTP id i4mr3508526wjs.50.1399312889781; Mon, 05 May 2014 11:01:29 -0700 (PDT) Received: by 10.227.57.133 with HTTP; Mon, 5 May 2014 11:01:29 -0700 (PDT) In-Reply-To: <1399303581.3137.9.camel@guybrush> References: <1CB4131A-13AA-4061-94F6-CA3B3EB1DB3E@ajf.me> <5FB10F5A-C78A-47C7-ABD1-A1CA1426B122@ajf.me> <0B48F9CB-D504-4274-8CE9-B330A4EDC4BD@zend.com> <1399303581.3137.9.camel@guybrush> Date: Mon, 5 May 2014 22:01:29 +0400 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Andrea Faulds , Andi Gutmans , PHP Internals Content-Type: multipart/alternative; boundary=047d7b86dd00b9b82304f8aaeb98 Subject: Re: [PHP-DEV] phpng: Refactored PHP Engine with Big Performance Improvement From: dmitry@zend.com (Dmitry Stogov) --047d7b86dd00b9b82304f8aaeb98 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The improvement are made with JIT in mind. In the future, in many places we might predict the type and don't check it at all. Thanks. Dmitry. On Mon, May 5, 2014 at 7:26 PM, Johannes Schl=C3=BCter wrote: > 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 > > --047d7b86dd00b9b82304f8aaeb98--