框架基准测试 ================= 在过去,开å‘çš„web应用程åºï¼Œæ€§èƒ½é—®é¢˜å¹¶ä¸æ˜¯ä½œä¸ºé¦–è¦è€ƒè™‘çš„é—®é¢˜ä¹‹ä¸€ã€‚å› ä¸ºç¡¬ä»¶å¯ä»¥å¡«è¡¥è¿™æ–¹é¢çš„ä¸è¶³ã€‚ç„¶åŽï¼Œå½“Google决定把网站的速度作为æœç´¢æŽ’åçš„æ¡ä»¶ä¹‹ä¸€æ—¶ï¼Œæ€§èƒ½çš„é‡è¦æ€§å°±ä½“现出æ¥äº†ã€‚ 以下的基准测试,将展示Phalconå’Œå…¶ä»–ä¼ ç»Ÿçš„PHP框架的性能对比,这些基准框架的版本都是最新的稳定版本。 我们欢迎程åºå‘˜åˆ©ç”¨æˆ‘们的基准测试程åºè¿›è¡Œæµ‹è¯•,如果您有更好的优化方案或æ„è§ï¼Œè¯· `write us`_. `Check out source at Github`_ 测试的环境? ------------------- 所有的框架都开å¯äº† APC_ 缓å˜ï¼Œä¸”ç¦ç”¨äº†apache mod_rewrite模å—,以é¿å…产生é¢å¤–的性能开销. 䏋颿˜¯æµ‹è¯•的硬件环境: * Operating System: Mac OS X Lion 10.7.4 * Web Server: Apache httpd 2.2.22 * PHP: 5.3.15 * CPU: 2.04 Ghz Intel Core i5 * Main Memory: 4GB 1333 MHz DDR3 * Hard Drive: 500GB SATA Disk *PHP version and info:* .. figure:: ../_static/img/bench-4.png :align: center *APC settings:* .. figure:: ../_static/img/bench-5.png :align: center List of Benchmarks ------------------ .. toctree:: :maxdepth: 1 benchmark/hello-world benchmark/micro ChangeLog --------- .. versionadded:: 1.0 Update Mar-20-2012: Benchmarks redone changing the apc.stat setting to Off. More Info .. versionchanged:: 1.1 Update May-13-2012: Benchmarks redone PHP plain templating engine instead of Twig for Symfony. Configuration settings for Yii were also changed as recommended. .. versionchanged:: 1.2 Update May-20-2012: Fuel framework was added to benchmarks. .. versionchanged:: 1.3 Update Jun-4-2012: Cake framework was added to benchmarks. It is not however present in the graphics, since it takes 30 seconds to run only 10 of 1000. .. versionchanged:: 1.4 Update Ago-27-2012: PHP updated to 5.3.15, APC updated to 3.1.11, Yii updated to 1.1.12, Phalcon updated to 0.5.0, Added Laravel, OS updated to Mac OS X Lion. Hardware upgraded. .. _decided: http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html .. _write us: http://phalcon.uservoice.com/ .. _Check out source at Github: https://github.com/phalcon/framework-bench .. _APC: http://php.net/manual/en/book.apc.php