KPHP from VK

    Just a few minutes ago, Pavel Durov on his VKontakte page introduced a new version of PHP called KPHP.
    A word to the 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 all VKontakte code into a compiled programming language that we have been developing for more than 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 page creation time by our servers before and after their translation from PHP to KPHP. KPHP supports most of the standards of regular PHP, but it works much faster and provides additional optimization options. Later we will provide the KPHP code for open access for all developers in the world .


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

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

    If there, on some tests, you can wait for the compilation to finish for half an hour, then we have all the VKontakte code compiled in a distributed manner 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. Say, everything related to OOP is very limited there.


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

    Also popular now: