Skip to content

PerformanceComparison

tanakahisateru edited this page Oct 11, 2010 · 1 revision

Performance comparison with other PHP frameworks.

  • 2.4GHz Core2 Duo
  • MacOS10.6
  • Apache2.2
  • PHP5.3

Hello World test

Benchmark test result for applications to show "Hello World" text only with various frameworks.

<p>Hello World.</p>

All applications are optimized to pass unused features like database setup or such as.

This table shows average duration to perform request with parallel 10 connections.

Framework without APC with APC
PHP only 0.363ms 0.359ms
CakePHP 31.094ms 11.042ms
CodeIgniter 5.510ms 2.157ms
Pinoco(with PHPTAL) 6.239ms 2.573ms
Pinoco(without PHPTAL) 3.755ms 1.890ms

Symfony ... not tested but must be worst, I guess.

See(Japanese): http://d.hatena.ne.jp/tanakahisateru/20100908/1283945076

Template engine performance

Template engine performance comparison with real layout and data.

Test program fills 4 elements having name and phone number properties into table tag structure with sanitizing.

<html>
  <head>
    <title>The title value</title>
  </head>
  <body>
    <h1>The title value</h1>
    <table>
      <thead>
        <tr><th></th><th>Name</th><th>Phone</th></tr>
      </thead>
      <tbody>
        <tr>
            <td>0</td>
            <td>foo</td>
            <td>01-344-121-021</td>
        </tr>
        <tr>
            <td>1</td>
            <td>bar</td>
            <td>05-999-165-541</td>
        </tr>
        <tr>
            <td>2</td>
            <td>baz</td>
            <td>01-389-321-024</td>
        </tr>
        <tr>
            <td>3</td>
            <td>quz</td>
            <td>05-321-378-654</td>
        </tr>
      </tbody>
    </table>
  </body>
</html>

This table shows average duration to perform request.

Engine Sequential w/o APC Parallel w/o APC Sequential with APC Parallel with APC
HTML 0.314ms 0.232ms n/a n/a
PHP 0.852ms 0.554ms 0.632ms 0.406ms
Smarty 4.491ms 2.512ms 1.160ms 0.682ms
PHPTAL 5.122ms 2.848ms 2.033ms 1.146ms

See(Japanese): http://d.hatena.ne.jp/tanakahisateru/20100906/1283766620