Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13109 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24048 invoked by uid 1010); 2 Oct 2004 10:44:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23497 invoked from network); 2 Oct 2004 10:44:41 -0000 Received: from unknown (HELO main.gmane.org) (80.91.229.2) by pb1.pair.com with SMTP; 2 Oct 2004 10:44:41 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CDhNY-0005MC-00 for ; Sat, 02 Oct 2004 12:44:40 +0200 Received: from dsl-082-082-034-126.arcor-ip.net ([82.82.34.126]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Oct 2004 12:44:40 +0200 Received: from thieso by dsl-082-082-034-126.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Oct 2004 12:44:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Sat, 2 Oct 2004 12:44:36 +0200 Lines: 43 Message-ID: References: <5.1.0.14.2.20041001092521.02efb790@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: dsl-082-082-034-126.arcor-ip.net User-Agent: Unison/1.5.2 Sender: news Subject: Re: [PHP-DEV] Variable fetch optimization From: thieso@gmail.com (Thies C . Arntzen) before: 34.430 after: 20.126 do i need to say more? (if it really works, which i haven't tested yet) great andi! re, tc PS: i really think that the vm should be generated by a script! looking at what makes most of the patch i really think that we're making hacking the engine more complex than needed. On 2004-10-01 18:31:37 +0200, Andi Gutmans said: > > Hi, > > Attached is a patch to optimize variable fetches (basically it caches > the fetches so that variables aren't re-fetched every time, most > noticeable in loops with the loop control counter but also it's a > general improvement). > It's similar to the patch Sterling and Thies did a year ago in their > optimization patch. > As compiling the zend_execute.c file is starting to take a long time > (minutes) due to inlining with the goto VM architecture, I suggest to > apply Zend.m4 to make the default the function handler paradigm. The > performance difference is not big and it'll make it easier to work on > PHP. For production environments one can use a configure switch to turn > this on. > I'd be happy to hear of benchmarks. > > In general, there might be problems with extensions which access the > active symbol table directly. It's something I still need to look into > so please report any problems. > > Please try and take some time to test it. > > Andi