Although PHP is a language that's easy to use, it suffers performance problems when running in large scale. We here present one approach to try to speed up PHP execution by transforming PHP into semantically equivalent C++. With this code transformation, (1) dynamic symbol look-ups can be replaced with C++'s static binding; and (2) weakly typed symbols can be inferred into stronger typing, taking advantage of type specialized implementation of the new runtime. Resulted C++ code has shown 2x to 3x speedup for Facebook web site.
The compiler is already open sourced here: HipHop-PHP
Slides:
Download in Microsoft Powerpoint Extended
format.
The slide set is also available in PDF, The conversion from Powerpoint appears
to generate bitmaps so the size is huge.
For manageability it is packaged in three parts.
Download part 1.
Download part 2.
Download part 3.
About the speaker:
Haiping Zhao is the Senior Server Engineer at Facebook and is leading the HipHop compiler team and is responsible for the web server software compiled with the compiler. Haiping joined Facebook as Server Architect at Plaxo, who is one of the earliest social networking companies and who was later acquired by Comcast. Prior to Plaxo, Haiping also worked on .Net Transaction Team, COM/DCOM Team, and SQL Server internals (MSDTC) from Microsoft. He also served as Server Architect/Engineer for startup companies DispenseSource and OmniCell, speciailized in inventory management. He graduated from Princeton with a master degree of Computer Science, and also a master degree of Pharmacology and Molecular Biology from New York University Medical Center.
Contact information:
Haiping Zhao
Facebook
Phone: 650-704-6111
Email: hzhao@facebook.com