Re: Will apc.optimization ever be put back to APC?

From: Date: Sun, 04 Dec 2011 19:55:29 +0000
Subject: Re: Will apc.optimization ever be put back to APC?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
I see your point about optimization being time consuming and the
penalty being greater if you're not using a bytecode cache. But that's
a reason to make it optional, not a reason to couple it with a
specific bytecode cache so it can't be used with others.

As for optimization not accomplishing all that much in PHP in general,
that I can't really argue with if it's true (:

On Sun, Dec 4, 2011 at 12:10 PM, Graham Kelly <[email protected]> wrote:
> 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 <[email protected]> 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
>>



-- 
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com


Thread (8 messages)

« previous php.internals (#56772) next »