Performance Considerations
We have already mentioned in the previous section that simply collecting the
possible roots had a very tiny performance impact, but this is when you
compare PHP 5.2 against PHP 5.3. Although the recording of possible roots
compared to not recording them at all, like in PHP 5.2, is slower, other
changes to the PHP runtime in PHP 5.3 prevented this particular performance
loss from even showing.
There are two major areas in which performance is affected. The first
area is reduced memory usage, and the second area is run-time delay when
the garbage collection mechanism performs its memory cleanups. We will
look at both of those issues.