Bug #74147 [NEW]: Performance degraded after Dec-6-2016

From: Date: Wed, 22 Feb 2017 09:16:47 +0000
Subject: Bug #74147 [NEW]: Performance degraded after Dec-6-2016
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207504@lists.php.net to get a copy of this message
From:             191919 at gmail dot com
Operating system: OS X
PHP version:      7.1Git-2017-02-22 (Git)
Package:          Performance problem
Bug Type:         Bug
Bug description:Performance degraded after Dec-6-2016

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.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=74147&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74147&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74147&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74147&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74147&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74147&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74147&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74147&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74147&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74147&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74147&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74147&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74147&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74147&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74147&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74147&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74147&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74147&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74147&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74147&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74147&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#207504) next »