Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71963 invoked from network); 7 Jun 2009 01:53:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2009 01:53:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=grahamk@facebook.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=grahamk@facebook.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain facebook.com designates 69.63.179.25 as permitted sender) X-PHP-List-Original-Sender: grahamk@facebook.com X-Host-Fingerprint: 69.63.179.25 mailout-snc1.facebook.com Linux 2.5 (sometimes 2.4) (4) Received: from [69.63.179.25] ([69.63.179.25:49259] helo=mailout-snc1.facebook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/58-30300-F8D1B2A4 for ; Sat, 06 Jun 2009 21:53:20 -0400 Received: from mail.thefacebook.com (intlb01.snat.snc1.facebook.com [10.128.203.15] (may be forged)) by pp-master.snc1.tfbnw.net (8.14.1/8.14.1) with ESMTP id n571rDiD016077 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Sat, 6 Jun 2009 18:53:13 -0700 Received: from SC-MBXC1.TheFacebook.com ([192.168.18.100]) by sc-hub01.TheFacebook.com ([192.168.18.104]) with mapi; Sat, 6 Jun 2009 18:53:16 -0700 To: Paul Biggar , Nuno Lopes CC: PHP Internals , Brian Shire Date: Sat, 6 Jun 2009 18:52:25 -0700 Thread-Topic: [PHP-DEV] RE: Optimizer discussion Thread-Index: AcnnD1s94mRhARInS6+8R55s8HqvegAAz99l Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5,1.2.40,4.0.166 definitions=2009-06-05_11:2009-06-01,2009-06-05,2009-06-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0811170000 definitions=main-0906060215 Subject: RE: [PHP-DEV] RE: Optimizer discussion From: grahamk@facebook.com (Graham Kelly) Hey, Sorry I haven't replied sooner. I'm glad to see that there is some interest= here. :-) Basically where I am at with the project at the moment is trying to get 5.3= compatibility with the current optimizer. At which point I would like to m= ore or less dump the code base I have now in favor of starting from the gro= und up on something that can be built into a much more powerful system. I d= o really like your idea Paul about using eval or something similar for doin= g compile time evaluations. Hopefully I can implement many of the stuff (li= ke all the function optimizations) this way. That should help to reduce a L= OT of the duplicated code; which I agree is not a good thing to have. I've = been working on whipping up an outline of where I want to take the project.= I look forward to getting feedback on that :-). As for runkit, I am not overly concerned with compatibility for extensions = such as runkit or xdebug, etc at the moment. I don't really see this being = too big of an issue for many people and if it turns out to be one I can loo= k into it when the time comes. Also, I wanted to let you know that I really enjoyed your tech talk, Paul. = Your papers also seem like really interesting (from what I have read thus f= ar). - Graham ________________________________________ From: Paul Biggar [paul.biggar@gmail.com] Sent: Saturday, June 06, 2009 6:28 PM To: Nuno Lopes Cc: Graham Kelly; PHP Internals; Brian Shire Subject: Re: [PHP-DEV] RE: Optimizer discussion On Fri, Jun 5, 2009 at 11:23 PM, Nuno Lopes wrote: > I'm happy there's some interest in a PHP optimizer :) > I agree with Paul that PECL's optimizer duplicates way too much stuff fro= m > the Zend engine, which is not practic nor maintainable. (compare for exam= ple > with the simple constant folder I implemented some years ago: > http://web.ist.utl.pt/nuno.lopes/zend_constant_folding.txt). This is certainly a much better demonstration of how the optimizer should w= ork. > 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. > P.S.: I'll try to meet with Paul in PLDI (in a week) and chat about these > kinds of things. Is anyone else comming that wants to join the discussion= ? You should probably mention this is in Dublin. Some of the IBM Toyko researches who work on (or maybe close to) Project Zero will be there, and might have interesting ideas. They have a paper on PHP memory usage. Paul -- Paul Biggar paul.biggar@gmail.com