Monthly Archives: September 2011

Performance improvements in PHP 5.4.0

One day I looked at a presentation about the upcoming PHP 5.4.0. I just stared at the slide 3 when I saw the numbers for performance and memory usage improvements. I said to myself: I have to make a test. I downloaded PHP 5.4.0alpha2, run “.configure” with mysql options and “make” and started the php cli command. And a mysql error popped up.

Today I looked at and a beta version was available. I ran the commands again and this time it worked. This are the results I got testing a rather complex (lots of posts and plugins) WordPress blog:

Run 5 times PHP 5.3.5 PHP 5.4.0beta1
Exec. time from 884 to 1004 ms from 641 to 777 ms
Mem. usage 26.00 MiB 14.75 MiB

For me it’s quite impressive. Script was executed in 25% less time and PHP process used 43% less memory. I can’t wait to install this on my production server, because waiting a half a second to generate a page (for my current configuration) is a little excessive.