📜 ⬆️ ⬇️

KPHP from VK

Just a few minutes ago, Pavel Durov on his VKontakte page introduced a new version of PHP, called KPHP.
Word author :

At the end of May, before the start of the holiday season, the daily attendance of VKontakte reached another record - almost 50 million users. It was then that we completed the translation of the entire VKontakte code into a compiled programming language that we have been developing for over a year - KPHP. As a result, almost all pages of the site began to load more than 2 times faster.


image
image
image
image

The images show the average creation time of pages by our servers before and after their conversion from PHP to KPHP. KPHP supports most of the standard PHP standards, but it works much faster and provides additional optimization options. Later we will provide open source KPHP code for all developers in the world .

')
I asked Paul to give a slightly more detailed commentary and this is what he replied:

On all tests, it was inconvenient for PHP HipHop (similar technology from FB). Either Facebook shared a badly corrupted version, or we developed something fundamentally better. This concerns not only the speed of the compiled code, but, above all, the speed of compilation.

If there you can wait half a hour for the end of compilation on some tests, then we have all the VK code compiled distributed in less than a minute.

Plus, there are additional built-in optimization options. Created by ACM champions. Of the minuses - not all PHP syntax is supported, but only the subset that we used in VK. For example, everything related to OOP is strongly limited there.


More detailed details are expected in the near future, stay in touch, Habrahabr.

Source: https://habr.com/ru/post/187214/


All Articles