-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good morning,
I just want to bring attention to the fact that while benchmarks show
that PHP 5.3 is faster than PHP 5.2 on linux systems on MacOS/X the
opposite is shown.
Actually just executing bench.php from the PHP distribution shows that
PHP 5.3 is about half the speed of PHP 5.2.5
How can that happen?
Greets,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkfwsNoACgkQSuF5XhWr2ng9egCgosYoQWLoXp4gpGLJSAz79uY7
ktkAoJdZ9Iq8DiDtqyGnQNseelAm/fyb
=UEbw
-----END PGP SIGNATURE
Hello Stefan,
did we change from non ZTS to ZTS builds on MacOS? ZTS builds do a bunch
of additional copying of tables.
marcus
Monday, March 31, 2008, 11:37:30 AM, you wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good morning,
I just want to bring attention to the fact that while benchmarks show
that PHP 5.3 is faster than PHP 5.2 on linux systems on MacOS/X the
opposite is shown.
Actually just executing bench.php from the PHP distribution shows that
PHP 5.3 is about half the speed of PHP 5.2.5
How can that happen?
Greets,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkfwsNoACgkQSuF5XhWr2ng9egCgosYoQWLoXp4gpGLJSAz79uY7
ktkAoJdZ9Iq8DiDtqyGnQNseelAm/fyb
=UEbw
-----END PGP SIGNATURE-----
Best regards,
Marcus
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Marcus,
did we change from non ZTS to ZTS builds on MacOS? ZTS builds do a bunch
of additional copying of tables.
Nope. Thread Safety is disabled.
I did my comparision with PHP 5.2.5 and PHP 5.3-Snapshot.
Both versions were compiled with a simple ./configure without any
additional parameter. bench.php was executed with the CLI SAPI.
Here are the tables for PHP 5.2.5
simple 0.328
simplecall 0.405
simpleucall 0.660
simpleudcall 0.767
mandel 0.993
mandel2 1.253
ackermann(7) 0.993
ary(50000) 0.050
ary2(50000) 0.048
ary3(2000) 0.498
fibo(30) 2.229
hash1(50000) 0.089
hash2(500) 0.091
heapsort(20000) 0.281
matrix(20) 0.237
nestedloop(12) 0.535
sieve(30) 0.222
strcat(200000) 0.040
Total 9.719
And here for PHP 5.3
simple 0.535
simplecall 0.799
simpleucall 1.322
simpleudcall 1.320
mandel 1.691
mandel2 2.170
ackermann(7) 1.299
ary(50000) 0.101
ary2(50000) 0.094
ary3(2000) 0.986
fibo(30) 3.282
hash1(50000) 0.225
hash2(500) 0.195
heapsort(20000) 0.499
matrix(20) 0.458
nestedloop(12) 0.948
sieve(30) 0.469
strcat(200000) 0.077
Total 16.469
regards,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkfxABIACgkQSuF5XhWr2niu0QCbBhCZWBW8nPX5G48YxNgM6qr2
8CQAn0SeMMKFjV1Hy/uKT4NSCMU5Lj/9
=lZtJ
-----END PGP SIGNATURE
I use debug/zts builds. my results are here:
PHP-5.3
simple 0.519
simplecall 1.441
simpleucall 2.378
simpleudcall 2.400
mandel 1.953
mandel2 2.814
ackermann(7) 2.671
ary(50000) 0.165
ary2(50000) 0.151
ary3(2000) 1.097
fibo(30) 5.745
hash1(50000) 0.265
hash2(500) 0.257
heapsort(20000) 0.629
matrix(20) 0.537
nestedloop(12) 0.978
sieve(30) 0.629
strcat(200000) 0.113
Total 24.743
PHP-5.2.5
simple 0.587
simplecall 1.464
simpleucall 2.681
simpleudcall 3.060
mandel 2.265
mandel2 2.896
ackermann(7) 3.421
ary(50000) 0.164
ary2(50000) 0.143
ary3(2000) 1.186
fibo(30) 9.752
hash1(50000) 0.281
hash2(500) 0.273
heapsort(20000) 0.722
matrix(20) 0.520
nestedloop(12) 1.020
sieve(30) 0.649
strcat(200000) 0.116
Total 31.200
On Mon, Mar 31, 2008 at 7:15 PM, Stefan Esser
stefan.esser@sektioneins.de wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi Marcus,
did we change from non ZTS to ZTS builds on MacOS? ZTS builds do a bunch
of additional copying of tables.Nope. Thread Safety is disabled.
I did my comparision with PHP 5.2.5 and PHP 5.3-Snapshot.
Both versions were compiled with a simple ./configure without any
additional parameter. bench.php was executed with the CLI SAPI.Here are the tables for PHP 5.2.5
simple 0.328
simplecall 0.405
simpleucall 0.660
simpleudcall 0.767
mandel 0.993
mandel2 1.253
ackermann(7) 0.993
ary(50000) 0.050
ary2(50000) 0.048
ary3(2000) 0.498
fibo(30) 2.229
hash1(50000) 0.089
hash2(500) 0.091
heapsort(20000) 0.281
matrix(20) 0.237
nestedloop(12) 0.535
sieve(30) 0.222
strcat(200000) 0.040
Total 9.719
And here for PHP 5.3
simple 0.535
simplecall 0.799
simpleucall 1.322
simpleudcall 1.320
mandel 1.691
mandel2 2.170
ackermann(7) 1.299
ary(50000) 0.101
ary2(50000) 0.094
ary3(2000) 0.986
fibo(30) 3.282
hash1(50000) 0.225
hash2(500) 0.195
heapsort(20000) 0.499
matrix(20) 0.458
nestedloop(12) 0.948
sieve(30) 0.469
strcat(200000) 0.077
Total 16.469
regards,
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.orgiEYEARECAAYFAkfxABIACgkQSuF5XhWr2niu0QCbBhCZWBW8nPX5G48YxNgM6qr2
8CQAn0SeMMKFjV1Hy/uKT4NSCMU5Lj/9
=lZtJ
-----END PGP SIGNATURE-------
--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/
Hi,
I just want to bring attention to the fact that while benchmarks show
that PHP 5.3 is faster than PHP 5.2 on linux systems on MacOS/X the
opposite is shown.Actually just executing bench.php from the PHP distribution shows that
PHP 5.3 is about half the speed of PHP 5.2.5How can that happen?
This commit is responsible for the bad performance:
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.11&r2=1.579.2.52.2.77.2.12&diff_format=u
Hi,
I just want to bring attention to the fact that while benchmarks show
that PHP 5.3 is faster than PHP 5.2 on linux systems on MacOS/X the
opposite is shown.Actually just executing bench.php from the PHP distribution shows
that
PHP 5.3 is about half the speed of PHP 5.2.5How can that happen?
This commit is responsible for the bad performance:
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.11&r2=1.579.2.52.2.77.2.12&diff_format=u
-gstabs versus -g should have no effect on production performance.
-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."
Hi
This commit is responsible for the bad performance:
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.11&r2=1.579.2.52.2.77.2.12&diff_format=u-gstabs versus -g should have no effect on production performance.
Ok, maybe i made a mistake, that's what i compared:
bench.php with cvs update -r PHP_5_3 -D "2008-03-09 14:26 GMT":
Total 6.883
cvs update -D "2008-03-09 14:28 GMT":
Total 13.961
cvs diff -D "2008-03-09 14:26 GMT" -D "2008-03-09 14:28 GMT"
? pear/scripts
cvs diff: Diffing .
Index: configure.in
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.647
retrieving revision 1.648
diff -r1.647 -r1.648
1c1
< ## $Id: configure.in,v 1.647 2008/02/17 20:49:46 helly Exp $ --
autoconf --
$Id: configure.in,v 1.648 2008/03/09 14:27:15 gwynne Exp $ -*-
autoconf -*-
124a125,139
dnl Darwin 9 hack
dnl Because the default debugging format used by Apple's GCC on Mac
OS 10.5
dnl causes errors in all current and past versions of Autoconf, we
do a little
dnl messing with the CFLAGS here to trick it.
php_did_darwin9_cheat=0
case $host_alias in
darwin9)
echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)' 2>/dev/null >/dev/
null
if test "$?" -ne 0; then
php_did_darwin9_cheat=1
CFLAGS="$CFLAGS -gstabs"
fi
;;
esac
170c185,192
< GCC_MAJOR_VERSION=$CC --version | $SED -n '1s/[[^0-9]]*\([[0-9]]\+ \)\.[[0-9]]\+\..*/\1/;1p'
case $host_alias in
darwin)
GCC_MAJOR_VERSION=$CC -dumpversion | $SED -nE '1s/([[0-9]]+)\. [[0-9]]+\..*/\1/;1p'
;;
*)
GCC_MAJOR_VERSION=$CC --version | $SED -n '1s/[[^0-9]]*\ ([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'
;;
esac
717a740,743
dnl Finish the Darwin hack
if test "$php_did_darwin9_cheat" -eq 1; then
CFLAGS=echo "$CFLAGS" | $SED -e 's/-gstabs//g'
fi
This commit is responsible for the bad performance:
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.11&r2=1.579.2.52.2.77.2.12&diff_format=u
-gstabs versus -g should have no effect on production performance.Ok, maybe i made a mistake, that's what i compared:
Upon investigation I've discovered the problem to be this: When the
Darwin hack takes effect, the overwrite of CFLAGS removes the default -
O2, thus the slowdown. I'll commit a fix shortly, with apologies for
the oversight.
-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."