Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Traits: A mechanism for fine-grained reuse
ACM Transactions on Programming Languages and Systems (TOPLAS)
PyPy's approach to virtual machine construction
Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications
A practical solution for scripting language compilers
Proceedings of the 2009 ACM symposium on Applied Computing
Trace-based just-in-time type specialization for dynamic languages
Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation
Evaluation of a just-in-time compiler retrofitted for PHP
Proceedings of the 6th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
Dynamic interpretation for dynamic scripting languages
Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization
The eval that men do: A large-scale study of the use of eval in javascript applications
Proceedings of the 25th European conference on Object-oriented programming
HappyJIT: a tracing JIT compiler for PHP
Proceedings of the 7th symposium on Dynamic languages
Optimizing R VM: Allocation Removal and Path Length Reduction via Interpreter-level Specialization
Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization
Hi-index | 0.00 |
Scripting languages are widely used to quickly accomplish a variety of tasks because of the high productivity they enable. Among other reasons, this increased productivity results from a combination of extensive libraries, fast development cycle, dynamic typing, and polymorphism. The dynamic features of scripting languages are traditionally associated with interpreters, which is the approach used to implement most scripting languages. Although easy to implement, interpreters are generally slow, which makes scripting languages prohibitive for implementing large, CPU-intensive applications. This efficiency problem is particularly important for PHP given that it is the most commonly used language for server-side web development. This paper presents the design, implementation, and an evaluation of the HipHop compiler for PHP. HipHop goes against the standard practice and implements a very dynamic language through static compilation. After describing the most challenging PHP features to support through static compilation, this paper presents HipHop's design and techniques that support almost all PHP features. We then present a thorough evaluation of HipHop running both standard benchmarks and the Facebook web site. Overall, our experiments demonstrate that HipHop is about 5.5x faster than standard, interpreted PHP engines. As a result, HipHop has reduced the number of servers needed to run Facebook and other web sites by a factor between 4 and 6, thus drastically cutting operating costs.