Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44198 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42715 invoked from network); 7 Jun 2009 11:55:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2009 11:55:15 -0000 Authentication-Results: pb1.pair.com header.from=rob_nicholson@uk.ibm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rob_nicholson@uk.ibm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain uk.ibm.com designates 195.212.29.139 as permitted sender) X-PHP-List-Original-Sender: rob_nicholson@uk.ibm.com X-Host-Fingerprint: 195.212.29.139 mtagate6.uk.ibm.com Linux 2.0.3x (2) Received: from [195.212.29.139] ([195.212.29.139:65204] helo=mtagate6.uk.ibm.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B2/A4-20836-1AAAB2A4 for ; Sun, 07 Jun 2009 07:55:14 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate6.uk.ibm.com (8.14.3/8.13.8) with ESMTP id n57Bt9E4494220 for ; Sun, 7 Jun 2009 11:55:09 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n57Bt9YG1421464 for ; Sun, 7 Jun 2009 12:55:09 +0100 Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.13.1/8.13.3) with ESMTP id n57Bt9kc009781 for ; Sun, 7 Jun 2009 05:55:09 -0600 Received: from d06ml069.portsmouth.uk.ibm.com (d06ml069.portsmouth.uk.ibm.com [9.149.38.195]) by d06av05.portsmouth.uk.ibm.com (8.13.1/8.12.11) with ESMTP id n57Bt8MY009775; Sun, 7 Jun 2009 05:55:08 -0600 In-Reply-To: References: X-Disclaimed: 57422 To: Paul Biggar Cc: Graham Kelly , PHP Internals , Nuno Lopes , Brian Shire MIME-Version: 1.0 X-KeepSent: 9F6B7696:A53B60EE-802575CE:003840A6; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5 November 18, 2008 Message-ID: Date: Sun, 7 Jun 2009 12:55:08 +0100 X-MIMETrack: Serialize by Router on D06ML069/06/M/IBM(Release 8.0.1|February 07, 2008) at 07/06/2009 12:55:08, Serialize complete at 07/06/2009 12:55:08 Content-Type: multipart/alternative; boundary="=_alternative 003B1E7A802575CE_=" Subject: Re: [PHP-DEV] RE: Optimizer discussion From: rob_nicholson@uk.ibm.com (Rob Nicholson) --=_alternative 003B1E7A802575CE_= Content-Type: text/plain; charset="US-ASCII" Graham, Paul, Paul Biggar wrote on 07/06/2009 02:28:48: > > On Fri, Jun 5, 2009 at 11:23 PM, Nuno Lopes wrote: > > > About runkit & friends, I wouldn't worr > much about them. If you're running > > them problably you also don't care about optimizations. If you want to be > > able to optimize something, you need to remove as many freedom degrees as > > you can.. > > This is probably true of runkit. However, I would be careful what you > remove for extra freedom. There is very likely PHP code out there that > relies (possibly by accident) on some edge cases. > Firsly its great to see more and more folks experimenting with the implementation of PHP. I think this will be good for the wider PHP community as the design of PHP and the possible optimisations become better understood. I think you'll find that there are a lot of "edge cases" as Paul mentions in PHP that PHP code relies on. I work on IBM's project zero and we have hit quite a lot of them. Just one example to illustrate. We found that the evaluation order within assignments is not at all what you might predict and that existing PHP applications actually rely on the evaluation order. Consider the following where foo() bar() and baz() have some coupling. $a[foo()]=$b[bar()][baz()]; Even though the test coverage of the Zend Engine as measured by line coverage is fairly complete we found that there were missing testcases to verify this behaviour. We've been following a policy of writing new tests for any such behaviour that we find so I would suggest that you ensure that you can run and pass all the PHPT tescases under /tests/lang and under /Zend. For example the tests for the behaviour I mention above are tests/lang/engine_assignExecutionOrder_XXX.phpt Then if you find any more PHP code that does not run the same optimised as it does unoptimised it would be great if you could contribute testcases for them. Actually for full disclosure I should say that although most of the tests we have written are now in cvs, we are still a little behind with contributing all the engine tests we have written. Hopefully they'll all be there before you need them. Rob Nicholson Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU --=_alternative 003B1E7A802575CE_=--