Facebook发布HipHop JIT
Fackbook 发布了PHP运行环境HipHop。HipHop提供JIT能力,替代了PHP传统运行和提供更好的页面解释性能,更低的CPU占用率。HipHop有助于提供可观的PHP可测量性和与Java,Python和C++为后端的最优的接口
倒不如说用一个结构复杂的HTML的微缓存系统,或者源码级的代码翻译器,Facebook的赵海平描述HipHop如何工作:
为PHP而产生的HipHop从技术上自身不是一个编译器。在一宽程序上它是一个源代码翻译器。HipHop程式化的翻译你的PHP代码到高性能C++,然后用g++去编译它。HipHop用一个相当语义的手法来执行源代码,并去牺牲一些极少用的特性。例如eval(),作为替代的是提高了性能。HipHop包括一个代码翻译器,一个PHP运行期系统的实现,和针对许多普通PHP扩展,利用这些性能最优化的重写模块。
翻译器处理包括三个主要步骤:
1. 静态分析,在此系统收集信息,谁宣告什么和依赖
2. 类型推断,在此将选择在C++ scalars, String, Array, classes, Object,中具体的类型
3. 代码生成,多半是一个从PHP声明和表达式到C++的声明和表达式的直接对应
总体而言,HipHop允许Facebook为PHP保持最佳表现,当利用到C++的性能优势时。总计,他们已经写了超过300,000行的代码超过5,000个单元测试,所有这些发布在开源PHP协议下面GitHub上。
Facebook Releases HipHop JIT
Posted by: Eugene Ciurana on ?? 03, 2010 DIGG
Facebook announced the HipHop for PHP runtime environment. HipHop provides JIT capabilities to PHP that supercede the traditional PHP runtime and provide better page rendering performance with lower CPU usage. HipHop helps to provide massive PHP scalability and optimal interfacing with Java, Python, and C++ back-ends.
Rather than using a complicated HTML particle caching system, or source-level code transformations, Haiping Zhao of Facebook describes how HipHop works:
HipHop for PHP isn't technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features -- such as eval() -- in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.
The transformation process includes three main steps:
1. Static analysis where the system collects information on who declares what and dependencies
2. Type inference where it chooses the most specific type between C++ scalars, String, Array, classes, Object, and Variant
3. Code generation which for the most part is a direct correspondence from PHP statements and expressions to C++ statements and expressions.
Overall HipHop allowed Facebook to keep the best aspects of PHP while taking advantage of the performance benefits of C++. In total, they have written over 300,000 lines of code and more than 5,000 unit tests. All of this is released on GitHub under the open source PHP license.
源文:http://www.theserverside.com/news/thread.tss?thread_id=59350
分享到:
相关推荐
HipHop PHP:Facebook出品的PHP虚拟机,运行时和JIT
HipHop VM(HHVM)是Facebook推出的用来执行PHP代码的虚拟机,它是一个PHP的JIT(Just-In- Time)编译器,同时具有产生快速代码和即时编译的优点。Facebook表示,HHVM将替代HPHPi,用于所有的PHP执行。根据 Facebook...
jit JavaScript jit JavaScript jit JavaScript jit JavaScript
HHVM即HipHop Virtual Machine,目前是3.0版本,出自Facebook,它先将PHP和Hack程序编译为中间字节码,然后通过just-in-time (JIT)编译器将字节码动态翻译为x64机器代码,应用上了非常多的编译优化技术。 JIT就是...
jit spray source code
IBM的一份对Method JIT和Trace JIT说明的文档。
jit数据库题库jit数据库题库jit数据库题库jit数据库题库jit数据库题库jit数据库题库
JIT是JUST IN TIME的意思,是精益生产的管理思想理论,借助JIT企业可以有效减少浪费,降低生产成本、提高产能、产品质量等。
jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识及JIT优化jvm初识...
JIT生产方式简介
jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1jit计算机系统基础1...
在JIT编译器生成本机代码 后,它会重写存根例程,插入一个jmp指令跳转到刚才JIT编译器的代码。只有当要调用某个方法时,JIT编译器才会将CIL的方法体编译为相应的本机机 器码版本。这样可以优化程序的工作集。
精益生产之JIT实务精益生产之JIT实务精益生产之JIT实务精益生产之JIT实务
Known as the JIT bible in Japan, JIT Implementation Manual ? The Complete Guide to Just-in-Time Manufacturing presents the genius of Hiroyuki Hirano, a top international consultant with vast ...
JIT Spray技术.pdf !!!!!!!!!!!!!!!!!
VMI-JITVMI-JITVMI-JITVMI-JITVMI-JIT
Android 系统的深入介绍 PPT中详细介绍了Dalvik VM 的工作原理,Dalvik JIT的工作原理,以及android 一些framework的大致结构。 公司内部做过一次培训,感觉还不错,共享出来,希望有所帮助
android jit技术的详细深入分析
JIT在供应链管理中的应用探析,李永祥,,JIT(Just-in-time,准时生产制)是针对企业内部的一种生产管理模式,其主旨是发现和消除浪费从而降低运营成本。通过发现企业内部潜在
jython2.2 parserparserparserparserparserparserparserparser python.jit