Benchmark of 4 different PHP Versions - and the winner is ?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
sigih.
-


Joined: 09 Mar 2012
Posts: 18
Location: austria

PostPosted: Sun Mar 30, 2014 4:02 pm    Post subject: Benchmark of 4 different PHP Versions - and the winner is ? Reply with quote

Hello !

Few days ago I made a interesting benchmark of 4 different PHP Versions !
I updated from 5.3.x to 5.4.x ... and made tests with the brand new 5.5.x Version - 32 and 64bit.
And I had an real AHA effect.

5.4 is really better/faster than 5.3 ... and the best is 5.5 !
See result:
####### PHP 5.3.28 BENCHMARK #######
Start : 03/30/2014 17:07:57 pm
Server : 192.168.0.23@192.168.0.23
Platform : WINNT
PHP version: 5.3.28
####################################
for : 0.04681 sec
while : 0.03121 sec
if else : 0.10923 sec
switch : 0.14043 sec
Ternary : 0.07802 sec
str_replace : 0.73338 sec
preg_replace : 0.06242 sec
preg_match : 1.06106 sec
count : 0.17164 sec
isset : 0.12483 sec
time : 0.10923 sec
strlen : 0.17164 sec
sprintf : 0.73338 sec
strcmp : 0.23406 sec
trim : 0.24966 sec
explode : 0.01560 sec
implode : 0.65536 sec
number_format : 0.76459 sec
floor : 0.17164 sec
strpos : 0.24966 sec
substr : 0.24966 sec
intval : 0.24966 sec
(int) : 0.14043 sec
is_array : 0.29647 sec
is_numeric : 0.29647 sec
is_int : 0.29647 sec
is_string : 0.28087 sec
ip2long : 1.01425 sec
long2ip : 1.56038 sec
date : 0.09362 sec
strftime : 0.12483 sec
strtotime : 0.12483 sec
strtolower : 1.45115 sec
strtoupper : 1.46676 sec
md5 : 0.45251 sec
unset : 0.15604 sec
list : 0.14043 sec
urlencode : 0.31208 sec
urldecode : 1.56038 sec
addslashes : 0.40570 sec
stripslashes : 0.26526 sec
####################################
Total : 16.852 sec

####### PHP 5.4.26 BENCHMARK #######
Start : 03/30/2014 17:08:53 pm
Server : 192.168.0.23@192.168.0.23
Platform : WINNT
PHP version: 5.4.26
####################################
for : 0.04681 sec
while : 0.01560 sec
if else : 0.06241 sec
switch : 0.07801 sec
Ternary : 0.06241 sec
str_replace : 0.65529 sec
preg_replace : 0.01560 sec
preg_match : 0.92053 sec
count : 0.12482 sec
isset : 0.09361 sec
time : 0.09361 sec
strlen : 0.10922 sec
sprintf : 0.54608 sec
strcmp : 0.20283 sec
trim : 0.18723 sec
explode : 0.01560 sec
implode : 0.49927 sec
number_format : 0.73330 sec
floor : 0.12482 sec
strpos : 0.18723 sec
substr : 0.18723 sec
intval : 0.18723 sec
(int) : 0.12482 sec
is_array : 0.18723 sec
is_numeric : 0.23403 sec
is_int : 0.21843 sec
is_string : 0.21843 sec
ip2long : 0.90493 sec
long2ip : 1.38860 sec
date : 0.03120 sec
strftime : 0.03120 sec
strtotime : 0.04681 sec
strtolower : 1.38860 sec
strtoupper : 1.41980 sec
md5 : 0.39006 sec
unset : 0.14042 sec
list : 0.09361 sec
urlencode : 0.20283 sec
urldecode : 1.51341 sec
addslashes : 0.28084 sec
stripslashes : 0.20283 sec
####################################
Total : 14.167 sec

####### PHP 5.5.10 BENCHMARK #######
Start : 03/30/2014 17:06:40 pm
Server : 192.168.0.23@192.168.0.23
Platform : WINNT
PHP version: 5.5.10 32bit Version
####################################
for : 0.01561 sec
while : 0.01561 sec
if else : 0.04682 sec
switch : 0.06243 sec
Ternary : 0.04682 sec
str_replace : 0.68673 sec
preg_replace : 0.03121 sec
preg_match : 1.23299 sec
count : 0.10925 sec
isset : 0.04682 sec
time : 0.07804 sec
strlen : 0.10925 sec
sprintf : 0.56187 sec
strcmp : 0.14047 sec
trim : 0.18729 sec
explode : 0.01561 sec
implode : 0.65551 sec
number_format : 0.73355 sec
floor : 0.10925 sec
strpos : 0.17168 sec
substr : 0.17168 sec
intval : 0.17168 sec
(int) : 0.10925 sec
is_array : 0.17168 sec
is_numeric : 0.18729 sec
is_int : 0.18729 sec
is_string : 0.18729 sec
ip2long : 0.20290 sec
long2ip : 0.62430 sec
date : 0.03121 sec
strftime : 0.04682 sec
strtotime : 0.04682 sec
strtolower : 1.09252 sec
strtoupper : 1.18616 sec
md5 : 0.34336 sec
unset : 0.12486 sec
list : 0.07804 sec
urlencode : 0.20290 sec
urldecode : 1.21738 sec
addslashes : 0.32776 sec
stripslashes : 0.18729 sec
####################################
Total : 11.955 sec

####### PHP 5.5.10 BENCHMARK #######
Start : 03/30/2014 17:10:19 pm
Server : 192.168.0.23@192.168.0.23
Platform : WINNT
PHP version: 5.5.10 64bit Version
####################################
for : 0.03120 sec
while : 0.01560 sec
if else : 0.06240 sec
switch : 0.07801 sec
Ternary : 0.04680 sec
str_replace : 0.53044 sec
preg_replace : 0.03120 sec
preg_match : 1.06088 sec
count : 0.09361 sec
isset : 0.06240 sec
time : 0.07801 sec
strlen : 0.09361 sec
sprintf : 0.48364 sec
strcmp : 0.12481 sec
trim : 0.15601 sec
explode : 0.01560 sec
implode : 0.43683 sec
number_format : 0.63965 sec
floor : 0.09361 sec
strpos : 0.17161 sec
substr : 0.18721 sec
intval : 0.17161 sec
(int) : 0.09361 sec
is_array : 0.15601 sec
is_numeric : 0.18721 sec
is_int : 0.17161 sec
is_string : 0.18722 sec
ip2long : 0.17161 sec
long2ip : 0.49924 sec
date : 0.01560 sec
strftime : 0.03120 sec
strtotime : 0.03120 sec
strtolower : 1.20129 sec
strtoupper : 1.15449 sec
md5 : 0.31202 sec
unset : 0.10921 sec
list : 0.09361 sec
urlencode : 0.18721 sec
urldecode : 1.21689 sec
addslashes : 0.28082 sec
stripslashes : 0.17161 sec
####################################
Total : 10.936 sec

The Test are made on an i7 3770K with 16GB RAM; 560Ti, Samsung 840pro SSD and Abyss 2.9.0.1 64bit on an VM-Ware 10 Image with Server 2008R2 64bit.
The benchmark only says that the math function are optimized with every major version ...

In summer I'll change to PHP 5.5. 64bit - it runs very stable with activated Opcache.
Has anyone also made speed tests with different PHP versions? Or tipps to optimize and speed up PHP.

greetz.
sigi[/img]
Back to top View user's profile Send private message Visit poster's website
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Fri Apr 25, 2014 11:32 am    Post subject: Re: Benchmark of 4 different PHP Versions - and the winner i Reply with quote

sigih,

Better compilers explain the 5.3 to 5.4 figures. The activation of the opcode cache by default in 5.5 explained the AHA effect in the new series.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
Toasty
-


Joined: 21 Feb 2008
Posts: 298
Location: Chicago, IL

PostPosted: Sat Apr 26, 2014 12:02 am    Post subject: Reply with quote

Not sure if you're using the preconfigured PHP from Aprelium, or installing PHP from PHP, but if it is the latter, opcode caching is disabled by default in your PHP.INI -- enable that, and you'll see even more improvements.


As for using x64 on what appears to be Windows -- it's still not considered an ideal situation for a server environment (but then again, neither is Windows).

What is the main driver to use x64 for you?
_________________
Audit the secure configuration of your server headers!
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group