Write a Blog >>
CC 2017
Sun 5 - Mon 6 February 2017 Austin, Texas, United States
Sun 5 Feb 2017 14:20 - 14:45 at 404 - Compilers

PHP is a dynamically typed programming language commonly used for the server-side implementation of web applications.
Approachability and ease of deployment have made PHP one of the most widely used scripting languages for the web, powering important web applications such as WordPress, Wikipedia, and Facebook.
PHP's highly dynamic nature, while providing useful language features, also makes it hard to optimize statically.

This paper reports on the implementation of purely static bytecode optimizations for PHP 7, the last major version of PHP. We discuss the challenge of integrating classical compiler optimizations, which have been developed in the context of statically-typed languages, into a programming language that is dynamically and weakly typed, and supports a plethora of dynamic language features. Based on a careful analysis of language semantics, we adapt static single assignment (SSA) form for use in PHP. Combined with type inference, this allows type-based specialization of instructions, as well as the application of various classical SSA-enabled compiler optimizations such as constant propagation or dead code elimination.

We evaluate the impact of the proposed static optimizations on a wide collection of programs, including micro-benchmarks, libraries and web frameworks.
Despite the dynamic nature of PHP, our approach achieves an average speedup of 50% on micro-benchmarks, 13% on computationally intensive libraries, as well as 1.1% (MediaWiki) and 3.5% (WordPress) on web applications.

Sun 5 Feb

Displayed time zone: Saskatchewan, Central America change

13:30 - 15:10
CompilersResearch Papers at 404
13:30
25m
Talk
Compile-Time Function Memoization
Research Papers
Arjun Suresh Ohio State University, USA, Erven Rohou Inria, France, André Seznec Inria, France
DOI
13:55
25m
Talk
One Compiler: Deoptimization to Optimized Code
Research Papers
Christian Wimmer , Vojin Jovanovic Oracle Labs, Erik Eckstein Oracle Labs, USA, Thomas Wuerthinger Oracle Labs
DOI
14:20
25m
Talk
Static Optimization in PHP 7
Research Papers
Nikita Popov TU Berlin, Germany, Biagio Cosenza TU Berlin, Germany, Ben Juurlink TU Berlin, Germany, Dmitry Stogov Zend Technologies, Russia
DOI
14:45
25m
Talk
From Functional Programs to Pipelined Dataflow Circuits
Research Papers
Richard Townsend Columbia University, USA, Martha A. Kim Columbia University, Stephen Edwards
DOI