HHVM JIT: A Profile-guided, Region-based Compiler For PHP And Hack
- Contents
- Abstract
- Supplementary Material
- References
- Information & Contributors
- Bibliometrics & Citations
- View Options
- References
- Media
- Tables
- Share
Abstract
Dynamic languages such as PHP, JavaScript, Python, and Ruby have been gaining popularity over the last two decades. A very popular domain for these languages is web development, including server-side development of large-scale websites. As a result, improving the performance of these languages has become more important. Efficiently compiling programs in these languages is challenging, and many popular dynamic languages still lack efficient production-quality implementations. This paper describes the design of the second generation of the HHVM JIT and how it addresses the challenges to efficiently execute PHP and Hack programs. This new design uses profiling to build an aggressive region-based JIT compiler. We discuss the benefits of this approach compared to the more popular method-based and trace-based approaches to compile dynamic languages. Our evaluation running a very large PHP-based code base, the Facebook website, demonstrates the effectiveness of the new JIT design.Supplementary Material
WEBM File (p151-ottoni.webm)- Download
- 107.35 MB
References
[1]Keith Adams, Jason Evans, Bertrand Maher, Guilherme Ottoni, Andrew Paroski, Brett Simmers, Edwin Smith, and Owen Yamauchi. 2014. The Hiphop Virtual Machine. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications. 777–790.Digital LibraryGoogle Scholar[2]Alexa. 2017. The top 500 sites on the web. Web site: http://www.alexa.com/topsites.Google Scholar[3]Eytan Bakshy and Eitan Frachtenberg. 2015. Design and Analysis of Benchmarking Experiments for Distributed Internet Services. In Proceedings of the International World Wide Web Conference. 108–118.Digital LibraryGoogle Scholar[4]Vasanth Bala, Evelyn Duesterwald, and Sanjeev Banerjia. 2000. Dynamo: A Transparent Dynamic Optimization System. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 1–12.Digital LibraryGoogle Scholar[5]James R. Bell. 1973. Threaded Code. Commun. ACM 16, 6 (June 1973), 370–372.Digital LibraryGoogle Scholar[6]Fabrice Bellard. 2005. QEMU, a fast and portable dynamic translator. In Proceedings of the USENIX Annual Technical Conference.Digital LibraryGoogle Scholar[7]Brad Calder and Dirk Grunwald. 1994. Reducing Indirect Function Call Overhead in C++ Programs. In Proceedings of the ACM Symposium on Principles of Programming Languages. 397–408.Digital LibraryGoogle Scholar[8]C. Chambers and D. Ungar. 1989. Customization: Optimizing Compiler Technology for SELF, a Dynamically-typed Object-oriented Programming Language. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 146–160.Digital LibraryGoogle Scholar[9]Craig Chambers and David Ungar. 1991. Making Pure Object-oriented Languages Practical. In Conference Proceedings on Object-oriented Programming Systems, Languages, and Applications. 1–15.Digital LibraryGoogle Scholar[10]George E. Collins. 1960. A Method for Overlapping and Erasure of Lists. Commun. ACM 3, 12 (December 1960).Digital LibraryGoogle Scholar[11]Emscripten Contributors. 2015. Emscripten: Optimizing Code – Very Large Codebases – Outlining. Web site: https://kripken.github.io/ emscripten-site/docs/optimizing/Optimizing-Code.html.Google Scholar[12]Martyn Corden. 2014. Diagnostic 25464: Some optimizations were skipped to constrain compile time. Web site: https://software.intel.com/en-us/articles/fdiag25464.Google Scholar[13]Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. 1991. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems 13, 4 (October 1991), 451–490.Digital LibraryGoogle Scholar[14]R. J. Dakin and P. C. Poole. 1973. A mixed code approach. Comput. J. 16, 3 (1973), 219–222.CrossrefGoogle Scholar[15]J. L. Dawson. 1973. Combining interpretive code with machine code. Comput. J. 16, 3 (1973), 216–219.CrossrefGoogle Scholar[16]James C. Dehnert, Brian K. Grant, John P. Banning, Richard Johnson, Thomas Kistler, Alexander Klaiber, and Jim Mattson. 2003. The Transmeta Code Morphing Software: Using Speculation, Recovery, and Adaptive Retranslation to Address Real-life Challenges. In Proceedings of the International Symposium on Code Generation and Optimization. 15–24.Digital LibraryGoogle Scholar[17]L. Peter Deutsch and Allan M. Schiffman. 1984. Efficient Implementation of the Smalltalk-80 System. In Proceedings of the ACM Symposium on Principles of Programming Languages. 297–302.Digital LibraryGoogle Scholar[18]Andreas Gal, Brendan Eich, Mike Shaver, David Anderson, David Mandelin, Mohammad R. Haghighat, Blake Kaplan, Graydon Hoare, Boris Zbarsky, Jason Orendorff, Jesse Ruderman, Edwin Smith, Rick Reitmaier, Michael Bebenita, Mason Chang, and Michael Franz. 2009. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 465–478.Digital LibraryGoogle Scholar[19]GCC Team. 2017. GNU Compiler Collection. Web site: http://gcc.gnu.org.Google Scholar[20]Jean Goubault. 1994. Generalized boxings, congruences and partial inlining. In Proceedings of the International Static Analysis Symposium. 147–161.CrossrefGoogle Scholar[21]Hack. 2017. Web site: http://hacklang.org.Google Scholar[22]Richard E Hank, Wen-Mei W Hwu, and B Ramakrishna Rau. 1995. Region-based compilation: An introduction and motivation. In Proceedings of the International Symposium on Microarchitecture. 158–168.Digital LibraryGoogle Scholar[23]HHVM Team. 2018. HHVM: The HipHop Virtual Machine. Web site: http://hhvm.com.Google Scholar[24]Urs Hölzle, Craig Chambers, and David Ungar. 1992. Debugging Optimized Code with Dynamic Deoptimization. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 32–43.Digital LibraryGoogle Scholar[25]Urs Hölzle and David Ungar. 1994. Optimizing Dynamically-dispatched Calls with Run-time Type Feedback. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 326–336.Digital LibraryGoogle Scholar[26]Urs Hölzle and David Ungar. 1994. A Third-generation SELF Implementation: Reconciling Responsiveness with Performance. In Proceedings of the ACM Conference on Object-oriented Programming Systems, Language, and Applications. 229–243.Digital LibraryGoogle Scholar[27]Intel Corporation. 2011. Intel ® 64 and IA-32 Architectures Software Developer’s Manual. Number 325384-039US.Google Scholar[28]Jens Knoop, Oliver Rüthing, and Bernhard Steffen. 1994. Partial Dead Code Elimination. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 147–158.Digital LibraryGoogle Scholar[29]Benjamin Letham, Brian Karrer, Guilherme Ottoni, and Eytan Bakshy. 2017. Constrained Bayesian Optimization with Noisy Experiments. CoRR abs/1706.07094v1 (2017). http://arxiv.org/abs/1706.07094v1Google Scholar[30]James G. Mitchell. 1970. The design and construction of flexible and efficient interactive programming systems. Ph.D. Dissertation. CarnegieMellon University.Digital LibraryGoogle Scholar[31]Guilherme Ottoni, Thomas Hartin, Christopher Weaver, Jason Brandt, Belliappa Kuttanna, and Hong Wang. 2011. Harmonia: a Transparent, Efficient, and Harmonious Dynamic Binary Translator Targeting x86. In Proceedings of the ACM International Conference on Computing Frontiers. 26:1–26:10.Digital LibraryGoogle Scholar[32]Guilherme Ottoni and Bertrand Maher. 2017. Optimizing Function Placement for Large-scale Data-center Applications. In Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization. 233–244.CrossrefGoogle Scholar[33]Michael Paleczny, Christopher Vick, and Cliff Click. 2001. The Java™ HotSpot Server Compiler. In Proceedings of the Symposium on Java Virtual Machine Research and Technology Symposium.Digital LibraryGoogle Scholar[34]Karl Pettis and Robert C. Hansen. 1990. Profile Guided Code Positioning. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 16–27.Digital LibraryGoogle Scholar[35]PHP. 2017. Web site: http://php.net.Google Scholar[36]Armin Rigo and Samuele Pedroni. 2006. PyPy’s approach to virtual machine construction. In Proceedings of the ACM Symposium on Objectoriented Programming Systems, Languages, and Applications. 944–953.Digital LibraryGoogle Scholar[37]Toshio Suganuma, Toshiaki Yasue, and Toshio Nakatani. 2006. A region-based compilation technique for dynamic compilers. ACM Transactions on Programming Languages and Systems (TOPLAS) 28, 1 (2006), 134–174.Digital LibraryGoogle Scholar[38]HHVM Team. 2017. HHVM Users. Web site: https://github.com/facebook/hhvm/wiki/users.Google Scholar[39]Spyridon Triantafyllis, Matthew J. Bridges, Easwaran Raman, Guilherme Ottoni, and David I. August. 2006. A Framework for Unrestricted Whole-program Optimization. In Proceedings of the ACM Conference on Programming Language Design and Implementation. 61–71.Digital LibraryGoogle Scholar[40]Christian Wimmer and Michael Franz. 2010. Linear Scan Register Allocation on SSA Form. In Proceedings of the IEEE/ACM International Symposium on Code Generation and Optimization. 170–179.Digital LibraryGoogle Scholar[41]Owen Yamauchi. 2012. On Garbage Collection. http://hhvm.com/blog/431/on-garbage-collection.Google Scholar[42]Haiping Zhao, Iain Proctor, Minghui Yang, Xin Qi, Mark Williams, Qi Gao, Guilherme Ottoni, Andrew Paroski, Scott MacVicar, Jason Evans, and Stephen Tu. 2012. The HipHop Compiler for PHP. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications. 575–586.Digital LibraryGoogle ScholarCited By
View all- Ayupov APanchenko MPupyrev SRodríguez GSadayappan PSukumaran-Rajam A(2024)Stale Profile MatchingProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction10.1145/3640537.3641573(162-173)Online publication date: 17-Feb-2024https://dl.acm.org/doi/10.1145/3640537.3641573
- Xing JQiu YHsu KSui SManaa KShabtai OPiasetzky YKadosh MKrishnamurthy ANg TChen ASchulzrinne HKohler EMaltz DMisra V(2023)Unleashing SmartNIC Packet Processing Performance in P4Proceedings of the ACM SIGCOMM 2023 Conference10.1145/3603269.3604882(1028-1042)Online publication date: 10-Sep-2023https://dl.acm.org/doi/10.1145/3603269.3604882
- Li YGupta AYang AChen PPinto JKarrer BPundir MBalandat MKejariwal ALee BVieira MCardellini VDi Marco ATuma P(2023)HHVM Performance Optimization for Large Scale Web ServicesProceedings of the 2023 ACM/SPEC International Conference on Performance Engineering10.1145/3578244.3583720(137-148)Online publication date: 15-Apr-2023https://dl.acm.org/doi/10.1145/3578244.3583720
- Show More Cited By
Index Terms
- HHVM JIT: a profile-guided, region-based compiler for PHP and Hack
Software and its engineering
Software notations and tools
Compilers
Dynamic compilers
Just-in-time compilers
Recommendations
HHVM JIT: a profile-guided, region-based compiler for PHP and Hack
PLDI '18Dynamic languages such as PHP, JavaScript, Python, and Ruby have been gaining popularity over the last two decades. A very popular domain for these languages is web development, including server-side development of large-scale websites. As a result, ...
Read MoreThe HipHop compiler for PHP
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsScripting 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, ...
Read MoreThe HipHop compiler for PHP
OOPSLA '12Scripting 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, ...
Read More
Comments
Information
Published In
PLDI 2018: Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and ImplementationJune 2018825 pagesISBN:9781450356985DOI:10.1145/3192366- General Chair:
- Jeffrey S. Foster
University of Maryland at College Park, USA
, - Program Chair:
- Dan Grossman
University of Washington, USA
- ACM SIGPLAN Notices Volume 53, Issue 4PLDI '18April 2018834 pagesISSN:0362-1340EISSN:1558-1160DOI:10.1145/3296979
- Editor:
- Matthew Fluet
Rodchester Institude of Technology
Sponsors
- SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
Association for Computing Machinery
New York, NY, United States
Publication History
Published: 11 June 2018Check for updates
Author Tags
- Hack
- PHP
- code optimizations
- dynamic languages
- profile-guided optimizations
- region-based compilation
- web server applications
Qualifiers
- Research-article
Conference
PLDI '18Sponsor:- SIGPLAN
Acceptance Rates
Overall Acceptance Rate 406 of 2,067 submissions, 20%Contributors
Other Metrics
View Article MetricsBibliometrics
Article Metrics
- 26Total CitationsView Citations
- 2,701Total Downloads
- Downloads (Last 12 months)377
- Downloads (Last 6 weeks)42
Other Metrics
View Author MetricsCitations
Cited By
View all- Ayupov APanchenko MPupyrev SRodríguez GSadayappan PSukumaran-Rajam A(2024)Stale Profile MatchingProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction10.1145/3640537.3641573(162-173)Online publication date: 17-Feb-2024https://dl.acm.org/doi/10.1145/3640537.3641573
- Xing JQiu YHsu KSui SManaa KShabtai OPiasetzky YKadosh MKrishnamurthy ANg TChen ASchulzrinne HKohler EMaltz DMisra V(2023)Unleashing SmartNIC Packet Processing Performance in P4Proceedings of the ACM SIGCOMM 2023 Conference10.1145/3603269.3604882(1028-1042)Online publication date: 10-Sep-2023https://dl.acm.org/doi/10.1145/3603269.3604882
- Li YGupta AYang AChen PPinto JKarrer BPundir MBalandat MKejariwal ALee BVieira MCardellini VDi Marco ATuma P(2023)HHVM Performance Optimization for Large Scale Web ServicesProceedings of the 2023 ACM/SPEC International Conference on Performance Engineering10.1145/3578244.3583720(137-148)Online publication date: 15-Apr-2023https://dl.acm.org/doi/10.1145/3578244.3583720
- Huang WMarr SUgawa THong JLanperne MPark JCerny TShahriar H(2023)Optimizing the Order of Bytecode Handlers in Interpreters using a Genetic AlgorithmProceedings of the 38th ACM/SIGAPP Symposium on Applied Computing10.1145/3555776.3577712(1384-1393)Online publication date: 27-Mar-2023https://dl.acm.org/doi/10.1145/3555776.3577712
- Lin WQin JChen YJin ZXu JZhang YCai SFu LChen YChen W(2023)JACO: JAva Code Layout Optimizer Enabling Continuous Optimization without Pausing Application Services2023 IEEE International Conference on Cluster Computing (CLUSTER)10.1109/CLUSTER52292.2023.00032(295-306)Online publication date: 31-Oct-2023https://doi.org/10.1109/CLUSTER52292.2023.00032
- Sriraman A(2023)Enabling hyperscale web servicesBenchCouncil Transactions on Benchmarks, Standards and Evaluations10.1016/j.tbench.2023.1000923:1(100092)Online publication date: Feb-2023https://doi.org/10.1016/j.tbench.2023.100092
- Ugur MJiang CErf AAhmed Khan TKasikci B(2022)One Profile Fits AllACM SIGOPS Operating Systems Review10.1145/3544497.354450256:1(26-33)Online publication date: 14-Jun-2022https://dl.acm.org/doi/10.1145/3544497.3544502
- He WMestre JPupyrev SWang LYu H(2022)Profile inference revisitedProceedings of the ACM on Programming Languages10.1145/34987146:POPL(1-24)Online publication date: 12-Jan-2022https://dl.acm.org/doi/10.1145/3498714
- Khan TUgur MNathella KSunwoo DLitz HJimenez DKasikci B(2022)Whisper: Profile-Guided Branch Misprediction Elimination for Data Center Applications2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO)10.1109/MICRO56248.2022.00017(19-34)Online publication date: Oct-2022https://doi.org/10.1109/MICRO56248.2022.00017
- Pelenitsyn ABelyakova JChung BTate RVitek J(2021)Type stability in Julia: avoiding performance pathologies in JIT compilationProceedings of the ACM on Programming Languages10.1145/34855275:OOPSLA(1-26)Online publication date: 15-Oct-2021https://dl.acm.org/doi/10.1145/3485527
- Show More Cited By
View options
View or Download as a PDF file.
PDFeReader
View online with eReader.
eReaderLogin options
Check if you have access through your login credentials or your institution to get full access on this article.
Sign inFull Access
Get this PublicationFigures
Other
Share
Share this Publication link
Copy LinkCopied!
Copying failed.
Share on social media
XLinkedInRedditFacebookemailAffiliations
Guilherme OttoniFacebook, USAView ProfileDownload PDF Go toGo toShow all referencesRequest permissionsExpand All Collapse Expand TableAuthors Info & Affiliations View Table of ContentsExport Citations
Select Citation formatBibTeXEndNoteACM Ref- Please download or close your previous search result export first before starting a new bulk export.Preview is not available.By clicking download,a status dialog will open to start the export process. The process may takea few minutes but once it finishes a file will be downloadable from your browser. You may continue to browse the DL while the export process is in progress.Download
- Download citation
- Copy citation
We are preparing your search results for download ...
We will inform you here when the file is ready.
Download now!Your Search Results Download RequestYour file of search results citations is now ready.
Download now!Your Search Results Download RequestYour search export query has expired. Please try again.
Từ khóa » Hhvm Php
-
HHVM | HHVM
-
Ending PHP Support, And The Future Of Hack - HHVM
-
Facebook/hhvm: A Virtual Machine For Executing Programs ... - GitHub
-
PHP 7 Vs HHVM - Which One Should You Use? - KeyCDN
-
HHVM Vs PHP 7 Performance Showdown (WordPress, Nginx)
-
Hhvm - Execute PHP And Hack Files - Ubuntu Manpage
-
Comparing PHP 7 Vs. HHVM - Application Performance Monitoring ...
-
An Intro To HHVM And Hack For PHP - Atomic Spin
-
4. PHP Features Not Supported In Hack - Hack And HHVM [Book]
-
12. HHVM And Hack - Modern PHP [Book] - O'Reilly
-
Using HHVM With PHP-FPM Fallback - EasyEngine
-
Facebook Releases HHVM 4.0 With PHP No Longer Supported
-
HHVM - MediaWiki