Simple HipHop Performance Question for Facebook

If I write a hello world application using a PHP web framework like CodeIgniter, then I compile it and run it using HipHop. Will it work faster than if I wrote one hello world application in django or rails?

+3
source share
6 answers

HIPHOP converts PHP code to C ++ code, which must be compiled to run. Since precompiled code runs faster and uses less memory, and then scriping languages ​​like python / php, it will probably work faster in the example you specified.

However, HIPHOP does not convert all code. A lot of code in php is dynamic and cannot be changed in C ++, which means that you have to write your code with this in mind. If codeigniter can even be compiled using HIPHOP, this is another question.

Terry Chai wrote a great article about HIPHOP, telling when to use it, its limitations and future. I would recount this as it will most likely answer most of your questions and give you some idea of ​​how this works :)

http://terrychay.com/article/hiphop-for-faster-php.shtml

+5
source

. HipHop ... . - HipHop - .

... , , , .

+4

django rails, .

  • php, apache, mod_php. mod_php helloworld.php script , , -, -, apache, apache .

  • php , php, ram. : apache, apache mod_php, apc - ram, , apache, .

  • hiphop apache, hiphop , - . , , :

    • , - - . .
    • . - (hiphop) (g++). hiphop c-, - ..
  • node.js, apache. script ( V8 ), AOT () ( JIT? i, ). ; node.js -. , hiphop - , node IO.

facebook , 50% - , ; , , php 5 - 250 .

50%? ...

  • - , , . IO
  • php- -, ++.
  • php C, , . C .

, , , , , ( ).

imo: , node.js:)

+4

. , facebook, . PHP . , . facebook PHP . , PHP, HipHop.

Facebook, HipHop.

+1

. ​​ - :

  • Django Apache
  • Django HTML-, ( )

  • HPHP Apache
  • HPHP HTML-, ( , )

, - . 10 000 concurrency, , , , HPHP Django rails - ,

, - ? , , ?

HPHP , IMHO ( , , , ).

0
source

Will it work faster than if I write the same hello world application in django or rails?

It will probably be, but don’t worry. If we are talking about future speed improvements from unreleased projects, Pythonistas pypy-jit and unladen-swallow , to look forward to;)

0
source

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


All Articles