Press "Enter" to skip to content

Yaf and Phalcon, which is faster?

After Yaf, there comes another PHP framework in extension(在Yaf发布以后, 又出现了一个PHP扩展的框架 Phalcon): Phalcon.
then there raise a problem, which people have asked multi-times to me, that is , which one is the *fastest*(于是就出现一个问题, 不停的有人问, 到底Yaf和Phalcon哪个快, 因为他们都在他们的主页上宣称是最快的框架)? Yaf, or Phalcon. as they both declared they are the fastest(Yaf, Phalcon)
So I did a simple benchmark(所以我做了个简单的测试), the benchmark scripts is provide by Ruilog, and could be found at: benchmark scripts

Hardware(测试机器)

  • 8 * Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
  • MemTotal: 12296092 kB
  • Apache 2.2
  • PHP 5.4.7 with APC-3.1.13

Benchmakr result(测试结果)

ab -n 30000 -c 100

Bechmark

More details:

framework QPS, LOAD, MEM(KB), TIME(ms); functions, include files
 symfony2     3707, 5.06,   0.00,  0.00;    3707, 5.06,   0.00,  0.00;      0,    0
       zf     1446,25.11,   0.00,  0.00;    1446,25.11,   0.00,  0.00;      0,    0
      zf2      678,49.44,   0.00,  0.00;     678,49.44,   0.00,  0.00;      0,    0
  cakephp     2361,16.11,   0.00,  0.00;    2361,16.11,   0.00,  0.00;      0,    0
  fuelphp     3742, 7.55,   0.00,  0.00;    3742, 7.55,   0.00,  0.00;      0,    0
   kohana     3336, 9.30,   0.00,  0.00;    3336, 9.30,   0.00,  0.00;      0,    0
       ci     5764, 7.14,   0.00,  0.00;    5764, 7.14,   0.00,  0.00;      0,    0
      yii     6343, 6.52,   0.00,  0.00;    6343, 6.52,   0.00,  0.00;      0,    0
     slim     6626, 5.60,   0.00,  0.00;    6626, 5.60,   0.00,  0.00;      0,    0
  laravel     7386, 5.55,   0.00,  0.00;    7386, 5.55,   0.00,  0.00;      0,    0
   doophp    11859, 5.18,   0.00,  0.00;   11859, 5.18,   0.00,  0.00;      0,    0
  colaphp    13701, 4.76,   0.00,  0.00;   13701, 4.76,   0.00,  0.00;      0,    0
micromvc4    13386, 4.59,   0.00,  0.00;   13386, 4.59,   0.00,  0.00;      0,    0
  phalcon    14289, 4.22,   0.00,  0.00;   14289, 4.22,   0.00,  0.00;      0,    0
      yaf    15990, 4.21,   0.00,  0.00;   15990, 4.21,   0.00,  0.00;      0,    0

the result is clear, right?
thanks

54 Comments

  1. Farhad Sakhaei
    Farhad Sakhaei October 8, 2017

    Although I know YAF is fastest, But please include Fat Free Framework to the benchmark too
    It is really very pretty framework

  2. 83Dianne
    83Dianne July 29, 2017

    Hi blogger, i must say you have hi quality content here.
    Your website should go viral. You need initial traffic boost only.
    How to get it? Search for; Mertiso’s tips go viral

  3. TT
    TT July 9, 2016

    > 老赵 | 07 Apr 2016 10:54
    这弱智就别在这里丢脸了

  4. 老赵
    老赵 April 7, 2016

    thinkphp 是最好的框架

  5. Phalcon serves more than double of CodeIgniter’s requests per second. And when you look at the time per request, Phalcon takes the least amount of time to handle requests. So whenever a framework says that it s fast, think that Phalcon is even faster.

  6. PuterSham
    PuterSham January 11, 2015

    那些说yaf连ORM都没有的菜比我对你们简直无语了,要ORM自己用composer随便拉一个,想用哪个用哪个,ORM这种东西本来就依赖数据库连接及查询速度,编译成扩展只是无谓的增加调试难度,鸟哥自然懒得跟你们解释这么浅显的道理

  7. Orino
    Orino December 26, 2014

    其实一直对鸟哥很崇拜,但是yaf始终不能火起来,我觉得是没好的推广,现在是的商业社会要求互联网是快速迭代的开发,所以建议yaf要考虑开发效率上的事情。

  8. motu interfaces
    motu interfaces November 22, 2014

    the Apple macbook is still a hot favorite of notebook users.
    macbook stands from Exec Find can be used to offer additional cooling to your Mac laptop Pro while making the tablet computer or
    laptop more convenient and more at ease to use.
    my site motu interfaces

  9. fun sexy girls toys
    fun sexy girls toys November 9, 2014

    The secret with these dresses is to allow them to float.
    It is also very important that the lingerie is comfortable, soft and skin-friendly.
    The one on view in the gallery here is French, from 1880,
    and decorated with polka dots on cotton.
    My blog; fun sexy girls toys

  10. joe
    joe October 23, 2014

    这么比不科学,yaf说白了就一个mvc 一个路由 功能简单的不能再简单
    连orm都没有。这种情况下也好意思跟phalcon比?
    如果yaf增加了orm 以及缓存等功能 在比较,就说不定谁差了
    何况在开发中只要用到数据库 基本就要引入orm ,只要你引入了第三方类库 性能肯定下来。 人家phalcon 可是早就把常用的类库引入到框架了

  11. Gorden
    Gorden September 18, 2014

    买东西不能只比便宜,要看性价比。同理,光快是不够的。
    yaf能不能把框架应该提供的类库做起来,并且同样性能比较好?(跟zend, yii比,不要跟特别简单的东西比。)

  12. simapple
    simapple September 16, 2014

    laravel在2版本的时候也这么“嚣张”呢

  13. Submit Local Reviews To Bing
    Submit Local Reviews To Bing September 7, 2014

    Debt negotiation is likely to have a negative impact on your
    credit score. Instead, this same character, the older version of Talia, continues to narrate
    at key points in the film – except that we never get to see
    who is behind the voice. Look for sites and providers that have
    fair shipping costs before locking into any purchase.
    My web blog :: Submit Local Reviews To Bing

  14. This adapter will plug into your laptop’s Micro-DVI port and carry
    a signal out from that port to make sure you a digital display that
    contains a regularly sized DVI source. The speaker bar above each
    of our keyboard produces acceptable audio best.
    Feel free to surf to my website: superdrive mac g5, fix slow using macbook pro,mobile accessories, iphone app development, iphone covers Deals, iphone covers coupons, wedding planner iphone app

  15. aaron
    aaron August 1, 2014

    这种测试意义不大
    http://www.techempower.com/benchmarks/#section=data-r6&hw=i7&test=db&l=sg
    第6轮 Single query中, yaf性能是phalcon的两倍
    第6轮 Multi query中, yaf性能是phalcon的近四倍
    http://www.techempower.com/benchmarks/#section=data-r7&hw=i7&test=db&l=sg
    第7轮 Single query中, yaf性能是phalcon的13倍
    第7轮 Multi query中, yaf得分98, phalcon则100%失败了
    ORM等的消耗很猛的, 追求极端性能用yaf, 兼顾性能和功能用Yii或phalcon

  16. iranw
    iranw June 20, 2014

    yaf和pha比是快点 但是如果算上开发效率 yaf自然不能与pha相提并论(注:当然很佩服鸟哥滴)
    框架没有最好的 只有最适合的

  17. yak
    yak November 28, 2013

    yaf怎么样只输出json ?

  18. Johnny
    Johnny October 22, 2013

    windows dll的连接挂了,请处理,谢谢!

  19. D
    D June 19, 2013

    Please add Lithium framework.

  20. 刘宝成
    刘宝成 April 5, 2013

    占个座

  21. Johnny
    Johnny February 15, 2013

    解决了,不好意思

  22. Johnny
    Johnny February 15, 2013

    yaf安装不了,确少pcre.h文件,centos5.5新安装的,pcre已经启用,php53-devel也安装了。全盘找不到pcre.h
    为啥?大牛

  23. 星期八
    星期八 December 7, 2012

    Yaf_Config_Ini 不错,我觉得这个完全可以独立出来作为一个扩展使用

  24. 雪候鸟
    雪候鸟 December 5, 2012

    @testf 请确保你看明白了文章开头的第二段文字. 谢谢

  25. testf
    testf December 5, 2012

    只比快是不科学的

  26. testf
    testf November 20, 2012

    一定比phalcon快,因为不是一个量级,你的明白?

  27. Anonymous
    Anonymous November 14, 2012

    菜鸟求解释,没有看懂,1600这个数字是什么意思

  28. Zong
    Zong November 6, 2012

    鸟哥,app 应用支持独立二级域名访问吗?

  29. raydez
    raydez October 31, 2012

    鸟哥,yaf中,plugin里可以设置或者修改controller的变量么

  30. 小牛
    小牛 October 14, 2012

    不错,不错,学习了!

  31. 久久星座约会
    久久星座约会 October 8, 2012

    久久星座约会
    以星座为主题的网络约会,爱情交友,目前只加女生
    Q群:235893866

  32. jason.Pan
    jason.Pan September 23, 2012

    It’s honor to meet you .

  33. Untitled
    Untitled September 23, 2012

    功能还有待进一步完善
    Layout
    Orm
    Acl
    Log
    .
    .
    .
    .

  34. 钱服哇丞
    钱服哇丞 September 22, 2012

    石家庄星座约会
    以星座为主题的同城约会,爱情交友,目前只同意女生加群。
    Q群:235893866

  35. 五点晨曦
    五点晨曦 September 21, 2012

    Doo一个纯php框架的性能居然保持跟yaf在同一个级别倒是很让我吃惊。
    Laravel的性能也相当不错,我最近很留意这个框架,在github上非常活跃,经常在我的首页刷屏,现在大版本号都已经彪到3了。

  36. shirne
    shirne September 20, 2012

    对CI比较失望
    怎么没有算上Think

  37. yearnfar
    yearnfar September 20, 2012

    呵呵,快一点没啥意思,最重要的是谁更强大,谁给程序员更多的自由~

  38. michae
    michae September 17, 2012

    老大,YAF有没有windows下为不同版本编译好的dll啊?

  39. dafei
    dafei September 17, 2012

    zf怎么这么慢

  40. emeraldZj
    emeraldZj September 17, 2012

    呵呵

Leave a Reply

Your email address will not be published. Required fields are marked *