CakePHP Version Comparison with PHP Version Comparison CakePHP Version Comparison with PHP Version Comparison

I've seen a few recent blog articles comparing the new version of PHP 5.4 to its predecessors and I thought I should get involved with this a bit as well.

To perform this test, I will layout the conditions I have chosen.  I'm trying to keep this as simple as possible.  I currently run a Dell Laptop with Windows 7 on it:

Windows NT 6.1 build 7601 (Unknown Windows version Business Edition Service Pack 1) i586

Because I often do a lot of .NET development recently I have PHP running as a CGI under IIS 7.5.

I then created a very simple .NET application that performs 100 requests of the same web page and tracks the response time.  These lists of response times are sorted and the highest and lowest responses are dropped.  The average is then calculated from this.


I've created a GitHub repository with this application here: https://github.com/endyourif/speedtester

The usage is quite simple: start <website address>.  When it's done it will display the average number of milliseconds.

Next, I have created two websites in my IIS, one with CakePHP version 1.3.11 and the other with CakePHP 2.1.3.

I proceeded to run the test code once for each site with PHP version 5.3.6.  The results were as follows:

CakePHP 1.3.11

100 runs, removing lowest and highest

Avg: 190 milliseconds

CakePHP 2.1.3

100 runs, removing lowest and highest

Avg: 180 milliseconds

Next, I upgraded the PHP version inside of IIS to version 5.4.4 and re-ran the test code and received the following results:

CakePHP 1.3.11

100 runs, removing lowest and highest

Avg: 201 milliseconds

CakePHP 2.1.3

100 runs, removing lowest and highest

Avg: 190 milliseconds

Results:

I'm as shocked as you are, the results went up!  Something seems fishy here and might require some more investigation…

 

Published on Jun 25, 2012

Tags: CakePHP Tutorial | Optimization | performance | php | PHP

Related Posts

Did you enjoy this article? If you did here are some more articles that I thought you will enjoy as they are very similar to the article that you just finished reading.

Tutorials

Learn how to code in HTML, CSS, JavaScript, Python, Ruby, PHP, Java, C#, SQL, and more.

No matter the programming language you're looking to learn, I've hopefully compiled an incredible set of tutorials for you to learn; whether you are beginner or an expert, there is something for everyone to learn. Each topic I go in-depth and provide many examples throughout. I can't wait for you to dig in and improve your skillset with any of the tutorials below.