[php-src] PR #22277: perf: make all static extensions use TSRMG_STATIC (+~8% performance in phpstan)
| From: | henderkes | Date: | Thu, 11 Jun 2026 05:16:55 +0000 |
| Subject: | [php-src] PR #22277: perf: make all static extensions use TSRMG_STATIC (+~8% performance in phpstan) | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36369@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22277
Author: henderkes
idea from https://github.com/shivammathur/homebrew-php/issues/5161#issuecomment-4608440602
refs https://github.com/php/php-src/pull/22231#issuecomment-4676385409
<table><tr><th>build</th><th>instructions</th><th>cycles</th><th>wall</th></tr><tr><td>gcc</td><td>350757833</td><td>398020433</td><td>36.0ms</td></tr><tr><td>gcc
patch</td><td>311983818{-11.1%}</td><td>359099148{-9.8%}</td><td>33.8ms{-6.1%}</td></tr><tr><td>clang</td><td>380052067</td><td>430493647</td><td>40.0ms</td></tr><tr><td>clang
patch</td><td>336051776{-11.6%}</td><td>386151196{-10.3%}</td><td>37.0ms{-7.5%}</td></tr></table>
affects x86_64 and aarch64 by ~the same percentage
The performance change in phpstan comes from tokenizer previously not getting the definition. in
order to prevent other extensions from accidentally forgetting to define it, just do it for all of
them