Find a Question:
Facebook php runs nine times faster with jit compiler
Facebook has managed to php code to run, thanks to the use of a just-in-time compiler and virtual machine. Nine times faster The implementation of Facebook, whose source code is placed on GitHub is especially suitable for large websites.
Facebook Logo Normally php an interpreted language, where the php binary ensures that the code is executed as machine code but in the implementation of Facebook is the php code translated into byte code by a just-in-time compiler. Because byte code can not be executed directly on a CPU that is running in a virtual machine. This construction is similar to Java and. NET. The combination of the virtual machine and the just-in-time compiler is called by Facebook HipHop Virtual Machine, since this year the construction turns on all the Facebook servers.
HHVM, where Facebook has worked for three years to ensure that php can run nine times faster so says an employee of the social-networking site opposite Computerworld. The virtual machine is particularly useful for large websites with a heavy load, for smaller sites, such as a simple WordPress blog, estimates the Facebook employee that there is “only” a five-fold improvement in speed.
The HipHop VM, the code on GitHub is placed , is the successor to an older Facebook project also went through life as HipHop. In this implementation, which has since been phased out, php was compiled to C + +. This resulted in a doubling of the speed of php. The implementation of the JIT compiler and the virtual machine is not only faster but also more dynamic. Translating PHP to C + + is in fact not possible in all cases, because not all possible operations can be predicted. For the jit compiler code does not need to be compiled in advance: that happens at the time when the code is executed.Viewing:-102
Answer this Question
You must be Logged In to post an Answer.
Not a member yet? Sign Up Now »
Star Points Scale
Earn points for Asking and Answering Questions!