Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56769 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85376 invoked from network); 4 Dec 2011 17:10:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2011 17:10:50 -0000 Authentication-Results: pb1.pair.com header.from=sgkelly4@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=sgkelly4@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: sgkelly4@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-ww0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:41415] helo=mail-ww0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/E3-65129-899ABDE4 for ; Sun, 04 Dec 2011 12:10:49 -0500 Received: by wgbds13 with SMTP id ds13so5116171wgb.5 for ; Sun, 04 Dec 2011 09:10:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=/34L8s3EDZsZ/K50GRMpdDu+3SmtzLWSrvrt2b4CmAI=; b=UbVt5BXKztDIxuV9IhASXy1oVvJxTL+yjQ5zTaNpcg2GBqi0ida6/vi1co22/730Y6 Ltq1Hh45TpLOI98EpqBrgtgqVpwSsztFvSETYDEo/8XbHsnGkE6ckTjRPRtJi2GeBcOt x72HCbx2Qih5sYbf4oCC8wJ46bjifJsO/7CPk= Received: by 10.180.77.42 with SMTP id p10mr8940127wiw.66.1323018646269; Sun, 04 Dec 2011 09:10:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.96.204 with HTTP; Sun, 4 Dec 2011 09:10:25 -0800 (PST) In-Reply-To: <4EDA6E8C.6040105@lerdorf.com> References: <012201ccb1d5$356a6fa0$a03f4ee0$@alliantinternet.com> <012601ccb1e9$6b7aad80$42700880$@alliantinternet.com> <4EDA6E8C.6040105@lerdorf.com> Date: Sun, 4 Dec 2011 12:10:25 -0500 Message-ID: To: Rasmus Lerdorf Cc: Dmitri Snytkine , Ferenc Kovacs , Tom Boutell , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Will apc.optimization ever be put back to APC? From: sgkelly4@gmail.com (Graham Kelly) While it might seem like a good idea to put something like this into APC it really just creates more problems than it is worth. I belive it was removed for that very reason; because it was making it difficult to distinguish opcode cache errors from optimizer errors. There was an attempt to move this out of APC and into a pecl/optimizer extension but that never panned out. Additionally, the optimizations never yielded anything too substantial.The problem is that while you might be able to optimize away several opcodes you are still left with the general overhead incurred from running PHP which prevents you from getting too much further. Some of the optimizations have been moved into PHP 5.3 (constant folding) and PHP 5.4 but many of them still have not been (dead code elimination, various jump optimizations etc etc). The assumption that it would be better to move an optimization pass into PHP core so that all programs, even those not using an opcode cache, could benefit from them isnt holy accurate. Optimization takes time. A prime example of this is the fact that optimization comprises the majority of the time spent by most C compilers. Without an opcode cache it is very possible that the amount of time spent to optimize a section of code could be longer than the amount of time/memory saved by it. Ultimately, advances will continue to be made in terms of PHP performance. But, those will probably not happen in opcode caches and might not happen in optimizer specific extensions. On Sat, Dec 3, 2011 at 1:46 PM, Rasmus Lerdorf wrote: > On 12/03/2011 10:28 AM, Dmitri Snytkine wrote: >> APC is great, APC definetely speeds up the php a lot but I just remember that there used to be also optimization options. >> I remember the days where eAccelerator and php accelerator and mmcache were popular. They all had code optimization option to speed up compiled scripts. > > Many of those optimizations have been either rolled into the standard > compiler or made irrelevant by changes to the opcodes themselves. > > -Rasmus > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >