Re: About optimization

From: Date: Wed, 13 Jan 2010 12:40:32 +0000
Subject: Re: About optimization
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-46682@lists.php.net to get a copy of this message
Sebastian Bergmann wrote:
Am 13.01.2010 12:18, schrieb mathieu.suen:
I would like to know why the opcode is not optimized.
    
Because any optimization, even very simple ones, impose a performance penalty in the default execution model of PHP which does not use a bytecode cache. For simple optimization I don't think so. Take the simple example: function foo() { $a = 45; return $a; } Here if you don't optimize you are creating a variable. So you put pressure on the gc and the memory. Best would be some benchmark. By the way why there is no native bytecode cache ?
Only when the bytecode is not regenerated for each execution does it make sense to invest for time for the then one-time compilation.
Sorry I don't understand what do you mean? -- Mathieu Suen

Thread (42 messages)

« previous php.internals (#46682) next »