Re: Property access slowness
| From: | Zeev Suraski | Date: | Sun, 25 May 2003 14:57:14 +0000 |
| Subject: | Re: Property access slowness | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1986@lists.php.net to get a copy of this message | ||
At 15:58 25/05/2003, Sterling Hughes wrote:
On Sun, 2003-05-25 at 04:24, Zeev Suraski wrote: At 19:15 24.05.2003, Sterling Hughes wrote:There's no ce->properties, it sits in each object instance, so not really... We could possibly look into some optimization along the lines of what Alan suggested. I haven't given it much thought, but apparently, if a class and its entire ancestors tree doesn't use PPP - it may be possible to save the get_property_info call. Remember that in general, the fact that property access is slower is no news - we know it would be. The gain in reduced copying should buy us some performance, though. ZeevHi, Property access with PHP5 is very slow compared to PHP4. The reason for this is that property access must be verified *every* time. This seems really unnecessary unless we're indirectly accessing properties.It has to be verified each time, because we're typeless, and can't do stuff like that in compile time. It's not related to indirect reference... Ahh, yeah. Can we at least embed property information within the ce->properties hashtable? Currently accessing properties in PHP5 is *15%* slower. Denormalizing the properties_info, should give a nice performance gain.