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
Times are displayed in time zone: Saskatchewan, Central America change

13:30 - 15:10: CompilersResearch Papers at 404
13:30 - 13:55
Talk
Compile-Time Function Memoization
Research Papers
Arjun SureshOhio State University, USA, Erven RohouInria, France, André SeznecInria, France
DOI
13:55 - 14:20
Talk
One Compiler: Deoptimization to Optimized Code
Research Papers
Christian Wimmer, Vojin JovanovicOracle Labs, Erik EcksteinOracle Labs, USA, Thomas WuerthingerOracle Labs
DOI
14:20 - 14:45
Talk
Static Optimization in PHP 7
Research Papers
Nikita PopovTU Berlin, Germany, Biagio CosenzaTU Berlin, Germany, Ben JuurlinkTU Berlin, Germany, Dmitry StogovZend Technologies, Russia
DOI
14:45 - 15:10
Talk
From Functional Programs to Pipelined Dataflow Circuits
Research Papers
Richard TownsendColumbia University, USA, Martha A. KimColumbia University, Stephen Edwards
DOI