mirror of
https://github.com/php/php-src.git
synced 2026-04-03 22:22:18 +02:00
Refactor GC data traversal loops
Previusly, to redce stack usage GC traversed object properties and array elements in both directions. At first, it seeked backward from the last element, to find the last refcounted zval. Then, it traversed elements forward. As result, we had 2 non-spatial memory accesses for each object/array and usuall 2 expensive CPU cache misses. Now all the traversal algorithms are refactored to scan elements only in forward direction. The number of checks and GC stack usage should be the same. The order of element processing may be differenr, but this should not be a problem.
This commit is contained in:
922
Zend/zend_gc.c
922
Zend/zend_gc.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user