static-php-cli
static-php-cli copied to clipboard
Performance degredation
For Laravel Herd, we compile the current versions of PHP with a version of static-php-cli from December 2023.
After upgrading to the latest version on the main branch, I notice a significant performance decrease with the compiled version of PHP.
I noticed this by running the Laravel 11 test suite. One test in particular https://github.com/laravel/framework/blob/11.x/tests/Support/SupportStrTest.php#L589-L602
Used extensions/build parameters:
intl,pdo_sqlite,sqlite3,curl,openssl,tokenizer,bcmath,bz2,calendar,dba,ftp,iconv,mysqli,mbstring,mbregex,xml,simplexml,ctype,dom,pdo,filter,session,zlib,fileinfo,pdo_mysql,posix,sockets,shmop,sodium,sysvmsg,sysvsem,sysvshm,gd,zip,gmp,redis,xmlwriter,phar,exif,xmlreader,readline,pcntl,soap,imagick,ffi,password-argon2,pgsql,pdo_pgsql,imap,ldap,xsl --debug --build-cli --build-fpm --with-libs=nghttp2 --no-strip
To reproduce the issue:
git clone https://github.com/laravel/framework.git
cd framework
composer update
php vendor/bin/phpunit tests/Support/SupportStrTest.php --filter=testWhetherTheNumberOfGeneratedCharactersIsEquallyDistributed
Test results
PHP 8.3.4 compiled with the version of static-php-cli from December 2023:
Time: 00:00.264, Memory: 10.00 MB
PHP 8.3.4 compiled with the current main branch
Time: 00:00.777, Memory: 10.00 MB
Edit: I'll go through some tagged versions locally using the build arguments to see which version introduced this bug