On Wed, 5 Dec 2007, Matthias Pigulla wrote: > > > Is it possible to always perform (unconditionally compile in) the > > > necessary housekeeping tasks but stick with the current GC, so that > > > cycle-detection only happens when the user calls a > > > gc_go_find_cycles() > > > function? Would that significantly improve the above numbers? > > > > Yes, that would be possible, but it wouldn't speed anything up in case > > you don't have any cycles. > > Not sure I got you right. That is, the speed penalty comes from > housekeeping? Does the new GC try to find cycles automatically > whenever a refcount goes down to zero?
Not immediately... the algorithm should only run when either the root buffer is full, or the function is run manually. > If building and maintaining data structures for the algorithm costs > only a little memory but speed impact is neglegible unless the > algorithm actually runs, then you could stick with the > non-cycle-detecting "legacy" GC (= speed) unless you know you have > cycles and/or want to trade a little processing time (a call to > gc_go_find_cycles()) for the memory it will/might free. Yes, exactly. But it's just as easy to turn automatic cleaning as well - in that case the find cycle algorithm will kick in at some specific amount of "freed" vars. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php