Facebook HipHop virtual machine for PHP?

≯℡__Kan透↙ 提交于 2019-12-01 11:17:41

You can find the details in the article linked in the article you linked:

hphpc is in essence a traditional static compiler that converts PHP→AST→C++→x64. We have long been keenly aware of the limitations to static analysis imposed by such a dynamic language as PHP, not to mention the risks inherent in developing software with hphpi and deploying with hphpc. Our experiences with hphpc led us to start experimenting with dynamic translation to native machine code, also known as just-in-time (JIT) compilation. A dynamic translator can observe data types as the program executes, and generate type-specialized machine code.

The type-specialized machine code runs faster. Unless you are the size of FB, you do not need this. Use APC or memcached and more traditional approaches to scaling out.

The other answer about HPHPC is accurate... the performance boost is quite nice, but only if you actually need it enough that it's worth the extra complexity.

I'd suggest waiting a few weeks or even months before looking into HPHPVM. It's looking promising, but it's still in the very early stages as far as optimization and bug-fixing go. In the long run it'll probably end up being a great alternative to Zend, but right now the relatively small boost in performance (compared to, say, full translated/compiled HipHop) is likely not worth the extra complexity. That said, do check back in a few months.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!