Re: Property access slowness

From: Date: Sun, 25 May 2003 12:59:35 +0000
Subject: Re: Property access slowness
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-1984@lists.php.net to get a copy of this message
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. -Sterling > > Andi -- "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." - Joseph Weizenbaum

« previous php.internals (#1984) next »