zendtech / ZendOptimizerPlus

Other
914 stars 142 forks source link

early_binding pass #193

Open jpauli opened 9 years ago

jpauli commented 9 years ago

Talked to dmitry about it.

The goal here is to do the early_binding at compile time, for each op_array, when the class_table of each op_array is known. This pass code binds the inherited class to its parent.

However, this seems to be really really close to what ZEND_DECLARE_INHERITED_CLASS_DELAYED does. It binds the inheritence tree, but at script loading. I didnt know about that when preparing my patch.

It however seems to bug as I get "class Serializable not found" when I run it against an app of mine :-p

nikic commented 9 years ago

Unless I missed something, this assumes that the looked up parent class is the same between all requests, which is not necessarily true.

dstogov commented 9 years ago

Fixed patch for PHP7, with benchmark results.

https://gist.github.com/dstogov/8d5c3224105f77ec4b84

However, I'm not sure if it makes sense to include it.

On Wed, Oct 22, 2014 at 11:33 PM, Nikita Popov notifications@github.com wrote:

Unless I missed something, this assumes that the looked up parent class is the same between all requests, which is not necessarily true.

— Reply to this email directly or view it on GitHub https://github.com/zendtech/ZendOptimizerPlus/pull/193#issuecomment-60141787 .