Facebook 9-fold faster development language PHP
In general, this means that the scripting languages do not translate into binary structure, and can not run as fast as the low-level languages, the same as C or C + +, but worldwide, many fans PHP, as this language is simple in design and has a rich features. To facilitate working with PHP on vysokonarguzhennyh projects, such as Facebook, was created by Larry HipHop, which aired PHP to C + + code to the one carried out faster processor. In Facebook said that until recently, they arranged HipHop, but with the growth of the user base, and he no longer cope with the service for more than a billion users. New virtual machine PHP is a development of HipHop and works on the principle of Just-in-Time compiler.
It converts on the fly PHP-code to bytecode, and stores the most popular compiled fragments in memory for their early call as needed. On a similar algorithm works and Java-server environment. "Just-in Time allows a virtual machine to make more intelligent decisions. For example, if there is a call in PHP MySQL, the compiler defines the type of data output, after which it generates or is the code that is best suited to handle these types of data, "- says Pobar.
Thus, on Facebook saying that although the compiler is smart enough to understand the types of data or to understand which parts of the code, it is better to keep alert, full of success still depends on the code implementation hands of the programmer. Company has already placed source virtual machine in the resource GitHub - https://github.com/Facebook/hiphop-php/wiki The company said that the use of a virtual machine is suitable for large projects with a high level of dynamic data generation.