Live data from Hacker News

VK.com's PHP accelerator – kPHP source code

github.com

21–27 of 27 posts

Re: VK.com's PHP accelerator – kPHP source code

#21
post #6

Sounds like HipHop, Facebook's PHP->C++ translator. http://en.wikipedia.org/wiki/HipHop_for_PHP Anyone know how they compare?

HipHop compiles the script natively, while KittenDB seems to converts to C++ and then compiles it. KittenDB seems to have fewer dependencies, meaning it's likely to be less feature rich. This could be down to the fact that HipHop is actually a full stack, while this is just the interpretation layer. I'm finding it difficult to find any more details because the documentation is in Russian. I'm interested in the fact t…

The original version of HipHop also compiled to C++. Very slow to compile C++ actually. HipHopVM is the one that compiles it natively, it's a successor to the original.

Re: VK.com's PHP accelerator – kPHP source code

#22
post #2

This is awesome, I was considering applying to vk.com because they seem to be a very good and open house based in St. Petersburg. I know it's where Snowden went to work too, and they're the ones behind Telegram. it's interesting how much I've heard about them since I started dating a Russian girl... but, yes, good things.

Yes, it's a beautiful building in the downtown of St.-Petersburg

https://maps.google.com/?ll=59.935336,30.325956&spn=0.002389...

http://en.wikipedia.org/wiki/Singer_House

Interestingly, it was built by Singer Corporation

http://en.wikipedia.org/wiki/Singer_Corporation

and essentially became the first business center in Russia [sic!] as lower floors were for Singer show rooms and the higher floors were rented out for other companies. Nowadays lower floors are housing the central book store («Дом Книги»). At the time it was built, its architecture was considered outlandish, but now it's one of the staples of St.-Petersburg.

Re: VK.com's PHP accelerator – kPHP source code

#23
post #17

Facebook's HHVM (HipHop VM) compiles webpages into native machine code that can be executed directly on the processor. People often confuse HHVM with HPHPc, also made by Facebook. HPHPc came first; it was a converter that converted all the PHP files in a folder into individual C++ files. In other words, you would end up uploading the C++ files to the server, not PHP files. Facebook abandoned HPHPc early on for multip…

Mostly right.

HPHPc produced the C++ code and that was compiled into a single binary executable. The deployment process involved using bittorrent to distribute the blob to all of the production servers.

HPHPc wasn't abandoned per say, it was only deprecated once the performance improvements brought on by HHVM were significant enough to justify the transition.

Re: VK.com's PHP accelerator – kPHP source code

#24
post #17

Facebook's HHVM (HipHop VM) compiles webpages into native machine code that can be executed directly on the processor. People often confuse HHVM with HPHPc, also made by Facebook. HPHPc came first; it was a converter that converted all the PHP files in a folder into individual C++ files. In other words, you would end up uploading the C++ files to the server, not PHP files. Facebook abandoned HPHPc early on for multip…

I deployed HHVM on a production site as a test, and without changing a single line of code, on average, I saw nearly a 60% decrease in page generation time from the standard PHP binary. Incredible.

Re: VK.com's PHP accelerator – kPHP source code

#25

Sounds like HipHop, Facebook's PHP->C++ translator. http://en.wikipedia.org/wiki/HipHop_for_PHP Anyone know how they compare?

There's a good write up (in Russian) here: http://habrahabr.ru/company/vkontakte/blog/214877/

As HHVM is more performant than HPHPc, it's a more relevant comparison. Even then, it's not entirely apples-apples since HHVM supports (almost) the entire language, whereas kPHP seems to only support a subset. Doing so likely lets them make a lot of performance optimizations you couldn't make otherwise.

Re: VK.com's PHP accelerator – kPHP source code

#26

kPHP doesn't support all of the PHP features - there is no OOP for example. They claim [0] though that kPHP is faster than its competitors. Unfortunately, it seems the documentation is currently available only in Russian. [0] - http://habrahabr.ru/company/vkontakte/blog/214877/ (it's in Russian, I used Google Translate)

> there is no OOP So basically it doesn't support 95% of all PHP code written in the past decade?

That is a bold claim.
Post reply on HN