Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58033 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51081 invoked from network); 24 Feb 2012 21:44:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2012 21:44:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain l-i-e.com designates 67.139.134.202 as permitted sender) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:3770] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/5D-17132-1D4084F4 for ; Fri, 24 Feb 2012 16:44:50 -0500 Received: (qmail 33980 invoked by uid 98); 24 Feb 2012 21:44:51 -0000 Received: from localhost by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.05 ( Clear:RC:1(127.0.0.1):. Processed in 0.036664 secs); 24 Feb 2012 21:44:51 -0000 Received: from localhost (HELO www.l-i-e.com) (127.0.0.1) by localhost with SMTP; 24 Feb 2012 21:44:51 -0000 Received: from webmail (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Fri, 24 Feb 2012 15:44:51 -0600 Message-ID: In-Reply-To: <4F44B923.6010303@php.net> References: <4F448356.3020008@php.net> <4F448B3B.9060801@php.net> <4F44B923.6010303@php.net> Date: Fri, 24 Feb 2012 15:44:51 -0600 To: internals@lists.php.net User-Agent: SquirrelMail/1.4.21 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] PHP Script Compile System From: ceo@l-i-e.com ("Richard Lynch") On Wed, February 22, 2012 3:45 am, Flavius Aspra wrote: > On 02/22/2012 07:29 AM, Rasmus Lerdorf wrote: >> complicated optimization passes or any of those things > > Would such things be welcome/needed in the engine or as an extension? Note that he said "complicated" :-) There are many trivial / easy optimizations of low-hanging fruit. It's just the out-of-band not-in-real-time complicated ones that PHP doesn't do, shouldn't do, and won't do. So if you find a quick easy one, it's most welcome... The complicated ones, not so much :-) PS The misinformation that opcode caches "save" compilation time routinely rears it's ugly head. Opcode caches save disk reads. Using the already-opcoded chunk is just gravy, because the cache does this (grossly over-simplified): if ($opcode = opcode_cache_get($filename)){ //added by opcode cache //do no disk I/O EXPENSIVE //Oh, and for gravy, don't compile it. } else{ $source = file_get_contents($filename); //EXPENSIVE $opcode = php_compile($source); } php_execute($opcode); instead of this: if ($source = opcode_cache_get($filename)){ //added by opcode cache //do no disk I/O EXPENSIVE } else{ $source = file_get_contents($filename); //EXPENSIVE } $opcode = php_compile($source); //cheap and easy small optimization missed php_execute($opcode); -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE