[php-src] PR #25654: Optimize argument preparation for small positional calls
| From: | drealecs | Date: | Sun, 22 Nov 2026 16:17:39 +0000 |
| Subject: | [php-src] PR #25654: Optimize argument preparation for small positional calls | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40899@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25654
Author: drealecs
zend_call_function() now has a fast path for calls with up to two positional arguments
passed by value.
This reduces the cost of invoking callbacks from functions such as usort() and
array_map(). Only argument preparation changes; callback execution and cleanup use the
existing code.
On Linux/GCC, usort() took about 6% less time to sort 100,000 shuffled integers or
floats with static fn($a, $b) => $a <=> $b.