php.net |  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-25 04:22 UTC
From: 191919 at gmail dot com Assigned: cmb (profile)
Status: No 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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 - 28 = ?
Subscribe to this entry?

 
 [2017-02-22 09:16 UTC] 191919 at gmail dot com
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [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
Is this still relevant, or has the reported performance regression
been fixed in the meantime?
 [2021-07-25 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 19:01:27 2021 UTC