Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67034 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7156 invoked from network); 10 Apr 2013 14:10:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Apr 2013 14:10:35 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain zend.com does not designate 209.85.220.171 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.171 mail-vc0-f171.google.com Received: from [209.85.220.171] ([209.85.220.171:51675] helo=mail-vc0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/D3-21449-AD275615 for ; Wed, 10 Apr 2013 10:10:35 -0400 Received: by mail-vc0-f171.google.com with SMTP id ha12so285551vcb.2 for ; Wed, 10 Apr 2013 07:10:31 -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=ztqn6C0mMpiF0xyMDf+X03oc+TxFd3mYw1R8cx/PJS0=; b=hF75drnm/nX4RFJ0RxC92+WXfDJa5LTp+3SwNsX8nQdbe4dB0hrEEpZOJb8N5f1us5 6WD1RAem9Vc8lasBwcUnprI6ttx7uoj5biShRevS3+6w1W4L/CPWE93PKixWplRPSnOX Y7qVWW+kaOgh3cuG18GSBCF6K+Hl8SFvixjr8uViw2EDQQenC5Kc6xB4o4ZI7cSm8Faw X1lhyfuHShcqGLc2B/4Tj7eajpLaCxhXidc1dVXYghRABhlFpSzhRGG+WqMbTVKo2Zw4 F9FWNSr/lm8y4iWRth4/MXlqd5mbXIVRqPRR48sqYNIrSN92LC2zgcEN7ESiSXpo5zA6 Grow== MIME-Version: 1.0 X-Received: by 10.58.84.164 with SMTP id a4mr1663216vez.9.1365603031646; Wed, 10 Apr 2013 07:10:31 -0700 (PDT) Received: by 10.58.95.226 with HTTP; Wed, 10 Apr 2013 07:10:31 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Apr 2013 18:10:31 +0400 Message-ID: To: Pierre Joye Cc: PHP Internals , Julien Pauli , Rasmus Lerdorf , Zeev Suraski Content-Type: multipart/alternative; boundary=047d7b6dbc229b167004da023ba2 X-Gm-Message-State: ALoCoQnzTeuhFpkI5L4wsd2J2E8LXRK1q2DvDi8In3eRvJfz8Mqq+dh+R99Dz208MCFS9DEB4jveMGqaOO7rkos/oZnuZanrERFC9N9J53PPA0V2wUFLqbhlkKM/qr5eZJ40VXuHKdbS Subject: Re: [PHP-DEV] OPcache optimizer improvement in PHP-5.5? From: dmitry@zend.com (Dmitry Stogov) --047d7b6dbc229b167004da023ba2 Content-Type: text/plain; charset=UTF-8 Yes. And it's the reason I'm asking for agreement. I may commit it into master and pecl, but it means that pecl branch is going to be ahead of PHP-5.5. Thanks. Dmitry. On Wed, Apr 10, 2013 at 5:24 PM, Pierre Joye wrote: > hi Dmitry, > > On Wed, Apr 10, 2013 at 1:57 PM, Dmitry Stogov wrote: > > Hi, > > > > Recently, I've found that OPcache optimizer misses a lot of abilities, > > because it handles only one op_array at once. So it definitely can't > perform > > any inter-function optimizations (e.g. inlining). > > > > Actually, it was not very difficult to switch to "script at once" > approach. > > The attached patch demonstrates it and adds per script constants > > substitution explained in the following script > > > > > define("FOO", 1); > > function foo() { > > echo FOO . "\n"; // optimizer will replace it with: echo "1\n"; > > } > > ?> > > > > Of course, I ran the PHP test suite and it passed all the same tests. > > Personally, I think it's safe to include this patch into 5.5 and make a > > green light to some other advanced optimizations in 5.5. (e.g. conversion > > INIT_FCALL_BY_NAME into DO_FCALL). > > > > Any thoughts? > > Mixed feeling, I like this "simple" optimization and the possible > gains but 5.5 is very closed from RC. > > Cheers, > -- > Pierre > > @pierrejoye > --047d7b6dbc229b167004da023ba2--