|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-07-13 15:23 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-07-13 15:23 UTC] cmb@php.net
[2021-07-25 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ I found performance regression caused by a series of git commits of Dec 6, 2016. The measurement is based on bench.php from php itself. The purpose is to execute all the benchmark functions 30 times: --- /Users/box/php-src/Zend/bench.php 2016-02-02 18:31:19.000000000 +0800 +++ bench.php 2016-03-17 16:08:58.000000000 +0800 @@ -366,7 +366,7 @@ $num = number_format($end-$start,3); $pad = str_repeat(" ", 24-strlen($name)-strlen($num)); - echo $name.$pad.$num."\n"; + //echo $name.$pad.$num."\n"; ob_start(); return getmicrotime(); } @@ -382,6 +382,7 @@ } $t0 = $t = start_test(); +for ($i=0;$i<30;++$i){ simple(); $t = end_test($t, "simple"); simplecall(); @@ -417,6 +418,7 @@ sieve(30); $t = end_test($t, "sieve(30)"); strcat(200000); +} $t = end_test($t, "strcat(200000)"); total($t0, "Total"); ?> I ran bench.php on a Mac Pro with 12x2.7 Xeon E5 under OS X El Capitan 10.11.6. The compiler is gcc-5.4.0: /opt/bin/gcc -v Using built-in specs. COLLECT_GCC=/opt/bin/gcc COLLECT_LTO_WRAPPER=/opt/libexec/gcc/x86_64-apple-darwin15.6.0/5.4.0/lto-wrapper Target: x86_64-apple-darwin15.6.0 Configured with: ../gcc-5.4.0/configure --prefix=/opt --enable-languages=c,c++,objc,obj-c++ Thread model: posix gcc version 5.4.0 (GCC) The configure script is: YACC=/usr/local/bin/bison CC=/opt/bin/gcc ./configure --prefix=/opt/php7 --enable-opcache --without-sqlite3 --without-pdo-sqlite --disable-phar --without-pear For git fe084168d0e7de28dc0efdd58635748de414ac9e: $ /opt/php7/bin/php bench.php ------------------------ Total 13.853 For git a722970033a8dabb5956625e89655b8eacc38e3a: $ /opt/php7/bin/php bench.php ------------------------ Total 14.432 For git 1113d589dc356cab3abd0f03d311e6205ad1178c: $ /opt/php7/bin/php bench.php ------------------------ Total 14.793 For git b149001ffd3acf5ba3262e361cc012910ede77da: $ /opt/php7/bin/php bench.php ------------------------ Total 15.076 and for the version of the time I wrote this bug report: $ /opt/php7/bin/php bench.php ------------------------ Total 15.353 There is a 10%+ performance loss since then.