Req #70497 [Opn->Csd]: Unnecessary HANDLE_BLOCK_INTERRUPTIONS leads to slowdown

From: Date: Sat, 17 Dec 2016 14:42:21 +0000
Subject: Req #70497 [Opn->Csd]: Unnecessary HANDLE_BLOCK_INTERRUPTIONS leads to slowdown
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206092@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70497&edit=1 ID: 70497 Updated by: nikic@php.net Reported by: dja at axtens dot net Summary: Unnecessary HANDLE_BLOCK_INTERRUPTIONS leads to slowdown -Status: Open +Status: Closed Type: Feature/Change Request Package: Performance problem Operating System: All PHP Version: 5.6Git-2015-09-15 (Git) -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: Closing here, as this is gone in PHP 7 and (per the linked PR) the 5.6 RMs decided not to change this in PHP 5.6. Previous Comments: ------------------------------------------------------------------------ [2015-09-15 04:01:13] dja at axtens dot net Description: ------------ Currently, HANDLE_BLOCK_INTERRUPTIONS and HANDLE_UNBLOCK_INTERRUPTIONS are used either for ZEND_SIGNAL support, or to call out to the zend utility functions struct to call a SAPI-specific function. However, the only SAPIs that populates those functions in the utility struct are the obsolete Apache 1 SAPIs: in all other cases the function pointer is NULL. As such, when ZEND_SIGNAL is off, we can actually remove the conditional branch entirely. This leads to a speed up on PHP5 code. I've measured the performance impact on a PowerPC 64-bit little-endian system and on a x86_64 laptop using the test script below. I see a ~6% improvement in performance on POWER and a ~4% improvement on x86_64. I also see an improvement in a e-commerce web application on POWER with this change. I've submitted this change as a pull request on GitHub. Test script: --------------- <?php for ($i=1; $i < 100000000; $i++) { $genericObject = new stdClass(); $a = (object) 8; $b = (object) 'abcde'; } ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70497&edit=1

« previous php.bugs (#206092) next »