RE: [PHP-DEV] Dismantling the lies...
| From: | David | Date: | Mon, 21 May 2007 06:29:03 +0000 |
| Subject: | RE: [PHP-DEV] Dismantling the lies... | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-29595@lists.php.net to get a copy of this message | ||
Hi,
I'm David Wang and I'm one of the students that is participating in Google Summer of Code
for this summer. My project addresses detecting reference cycles in PHP, and I'm following this
discussion because it seems very pertinent to what I will be working with this summer. I'm
currently planning on implementing Bacon and Rajan's synchronous cycle collection algorithm
based on reference counting. The algorithm requires performing a simple additional task for each
increment or decrement of the reference counter. There is a branch in the decrement operation but
there is no branch in the increment operation. I wasn't aware that a simple branch such as the
one in the proposed patch would incur significant performance penalties on modern superscalar
processors, since both execution paths would be followed simultaneously. However, I would also be
very grateful for any performance data anyone can provide on this subject (and really, any other
advice anyone has!).
The function call does strike me as completely unnecessary and the additional stack operations
required are expensive. I'm willing to be that if the function was converted to a macro, the
proposed solution would be a workable fix. Just my two cents; I'm not very experienced with the
PHP internals yet.
Thanks all!
David Wang
-----Original Message-----
From: Stanislav Malyshev [mailto:stas@zend.com]
Sent: Sunday, May 20, 2007 11:08 PM
To: Cristian Rodriguez
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Dismantling the lies...
> no, no performance tests has been done over that patch, but as rasmus
> said. it is probably negible or acceptable for real world.. I only
> knows it works with real like code ( i tried ezpublish, phpmyadmin)
> and passes the PHP test suite correctly ( or no worse than without the
> patch)
Well, php test suite is a functional test, so if the patch is done
correctly it'd pass of course. I'm moe worried about the performance -
my experience shows that the guesses are often wrong when talked about
performance effects in complicated code. If you would have time to run a
benchmark using something like bench.php and maybe some more complicated
code, it'd be nice to know the result.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php