Re: Property access slowness

From: Date: Sun, 25 May 2003 19:38:06 +0000
Subject: Re: Property access slowness
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-1997@lists.php.net to get a copy of this message
At 08:59 AM 5/25/2003 -0400, Sterling Hughes wrote:
On Sun, 2003-05-25 at 00:08, Andi Gutmans wrote: At 12:15 PM 5/24/2003 -0400, Sterling Hughes wrote:
Hi, 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. Can/Should this be moved to zend_compile.c for everything that doesn't rely on indirect reference?
Which accesses are slower, $obj->prop, $this->prop or both? I just benchmarked $obj->prop, but I would imagine both. Its handlers->property_read(), that's the bottleneck.
It was a given that PPP would slightly slow things down but it's worth it. If we find a clean way of speeding it up I'd welcome it but I wouldn't want to take extreme measures like not using zval's for properties or other ugly solutions just to speed things up a bit. I would like to hear how $this->prop compares to PHP 4 (on more than one architecture) because the $this lookup is supposed to be saved in PHP 5. So we might (hopefully) be faster in PHP 5. Andi

« previous php.internals (#1997) next »