Static optimization in PHP 7

dc.contributor.authorPopov, Nikita
dc.contributor.authorCosenza, Biagio
dc.contributor.authorJuurlink, Ben
dc.contributor.authorStogov, Dmitry
dc.date.accessioned2018-06-07T15:16:12Z
dc.date.available2018-06-07T15:16:12Z
dc.date.issued2017
dc.description.abstractPHP 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.en
dc.identifier.isbn978-1-4503-5233-8
dc.identifier.urihttps://depositonce.tu-berlin.de//handle/11303/7919
dc.identifier.urihttp://dx.doi.org/10.14279/depositonce-7080
dc.language.isoenen
dc.rights.urihttp://rightsstatements.org/vocab/InC/1.0/en
dc.subject.ddc004 Datenverarbeitung; Informatikde
dc.subject.otherPHPen
dc.subject.otherstatic optimizationen
dc.subject.otherSSA formen
dc.titleStatic optimization in PHP 7en
dc.typeConference Objecten
dc.type.versionacceptedVersionen
dcterms.bibliographicCitation.doi10.1145/3033019.3033026en
dcterms.bibliographicCitation.originalpublishernameAssociation for Computing Machinery (ACM)en
dcterms.bibliographicCitation.originalpublisherplaceNew York, NY, USAen
dcterms.bibliographicCitation.pageend75en
dcterms.bibliographicCitation.pagestart65en
dcterms.bibliographicCitation.proceedingstitleProceedings of the 26th International Conference on Compiler Construction - CC 2017en
tub.accessrights.dnbdomainen
tub.affiliationFak. 4 Elektrotechnik und Informatik>Inst. Technische Informatik und Mikroelektronik>FG Architektur eingebetteter Systemede
tub.affiliation.facultyFak. 4 Elektrotechnik und Informatikde
tub.affiliation.groupFG Architektur eingebetteter Systemede
tub.affiliation.instituteInst. Technische Informatik und Mikroelektronikde
tub.publisher.universityorinstitutionTechnische Universität Berlinen
Files
Original bundle
Now showing 1 - 1 of 1
Loading…
Thumbnail Image
Name:
popov_etal_2017.pdf
Size:
1.04 MB
Format:
Adobe Portable Document Format
Description:
Collections