Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13098 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25979 invoked by uid 1010); 1 Oct 2004 16:31:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25897 invoked from network); 1 Oct 2004 16:31:44 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 1 Oct 2004 16:31:44 -0000 Received: (qmail 29661 invoked from network); 1 Oct 2004 16:31:41 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 1 Oct 2004 16:31:41 -0000 Message-ID: <5.1.0.14.2.20041001092521.02efb790@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 01 Oct 2004 09:31:37 -0700 To: internals@lists.php.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_55746959==_" Subject: Variable fetch optimization From: andi@zend.com (Andi Gutmans) --=====================_55746959==_ Content-Type: text/plain; charset="us-ascii"; format=flowed 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 --=====================_55746959==_--