CakePHP Version Comparison with PHP Version Comparison

Published on Jun 25, 2012 by Jamie Munro

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…

 

Tags: CakePHP | Optimization | performance | php | cakephp 2.0 | PHP

Related Posts

blog comments powered by Disqus