|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74147 Performance degraded after Dec-6-2016
Submitted: 2017-02-22 09:16 UTC Modified: 2021-07-13 15:23 UTC
From: 191919 at gmail dot com Assigned: cmb (profile)
Status: Feedback Package: Performance problem
PHP Version: 7.1Git-2017-02-22 (Git) OS: OS X
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: 191919 at gmail dot com
New email:
PHP Version: OS:


 [2017-02-22 09:16 UTC] 191919 at gmail dot com
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";
   return getmicrotime();
@@ -382,6 +382,7 @@
 $t0 = $t = start_test();
+for ($i=0;$i<30;++$i){
 $t = end_test($t, "simple");
@@ -417,6 +418,7 @@
 $t = end_test($t, "sieve(30)");
 $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.
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-13 15:23 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-13 15:23 UTC]
Is this still relevant, or has the reported performance regression
been fixed in the meantime?
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 24 10:01:24 2021 UTC