[php-src] PR #25976: Zend: Check vm_interrupt with relaxed load before atomic exchange

From: Date: Mon, 30 Nov 2026 21:48:39 +0000
Subject: [php-src] PR #25976: Zend: Check vm_interrupt with relaxed load before atomic exchange
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-41288@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25976 Author: iliaal zend_call_function() runs an atomic_exchange() on EG(vm_interrupt) after every callback, an exclusive cache-line read-modify-write even when no interrupt is pending. Load the flag first and exchange only when it is set, as ZEND_VM_FCALL_INTERRUPT_CHECK() does. On an idle Neoverse-N1 (GCC 13.3, -O2 NTS), array_map() with a closure runs 6.0% faster and usort() with a comparator 3.7% faster, while a benchmark that makes no callbacks is unchanged.

« previous php.git-pulls (#41288) next »