HappyJIT: a tracing JIT compiler for PHP

  • Authors:
  • Andrei Homescu;Alex Şuhan

  • Affiliations:
  • University of California Irvine, Irvine, CA, USA;University of Bucharest, Bucharest, Romania

  • Venue:
  • Proceedings of the 7th symposium on Dynamic languages
  • Year:
  • 2011
  • The HipHop compiler for PHP

    Proceedings of the ACM international conference on Object oriented programming systems languages and applications

Quantified Score

Hi-index 0.01

Visualization

Abstract

Current websites are a combination of server-generated dynamic content with client-side interactive programs. Dynamically - typed languages have gained a lot of ground in both of these domains. The growth of Web 2.0 has introduced a myriad of websites which contain personalized content, which is specific to the user. PHP or Python programs generate the actual HTML page after querying a database and processing the results, which are then presented by the browser. It is becoming more and more vital to accelerate the execution of these programs, as this is a significant part of the total time needed to present the page to the user. This paper presents a novel interpreter for the PHP language written in RPython, which the PyPy translator then translates into C. The translator integrates into the interpreter a tracing just-in-time compiler which optimizes the hottest loops in the interpreted programs. We also describe a data model that supports all the data types in the PHP language, such as references and iterators. We evaluate the performance of this interpreter, showing that speedups up to a factor of 8 are observed using this approach.