ShortCut
- 24 June 2017
- conference paper
- conference paper
- Published by Association for Computing Machinery (ACM) in Proceedings of the 44th Annual International Symposium on Computer Architecture
- p. 494-506
- https://doi.org/10.1145/3079856.3080237
Abstract
The same flexibility that makes dynamic scripting languages appealing to programmers is also the primary cause of their low performance. To access objects of potentially different types, the compiler creates a dispatcher with a series of if statements, each performing a comparison to a type and a jump to a handler. This induces major overhead in instructions executed and branches mispredicted. This paper proposes architectural support to significantly improve the efficiency of accesses to objects. The idea is to modify the instruction that calls the dispatcher so that, under most conditions, it skips most of the branches and instructions needed to reach the correct handler, and sometimes even the execution of the handler itself. Our novel architecture, called ShortCut, performs two levels of optimization. Its Plain design transforms the call to the dispatcher into a call to the correct handler --- bypassing the whole dispatcher execution. Its Aggressive design transforms the call to the dispatcher into a simple load or store --- bypassing the execution of both dispatcher and handler. We implement the ShortCut software in the state-of-the-art Google V8 JIT compiler, and the ShortCut hardware in a simulator. We evaluate ShortCut with the Octane and SunSpider JavaScript application suites. Plain ShortCut reduces the average execution time of the applications by 30% running under the baseline compiler, and by 11% running under the maximum level of compiler optimization. Aggressive ShortCut performs only slightly better.Keywords
Funding Information
- National Science Foundation (CCF 1527223 and CNS 1319657)
This publication has 18 references indexed in Scilit:
- Accelerating asynchronous programs through event sneak peekPublished by Association for Computing Machinery (ACM) ,2015
- An Evaluation of High-Level Mechanistic Core ModelsACM Transactions on Architecture and Code Optimization, 2014
- Improving JavaScript performance by deconstructing the type systemPublished by Association for Computing Machinery (ACM) ,2014
- Improving the performance of object-oriented languages with dynamic predication of indirect jumpsPublished by Association for Computing Machinery (ACM) ,2008
- VPC predictionPublished by Association for Computing Machinery (ACM) ,2007
- PinPublished by Association for Computing Machinery (ACM) ,2005
- An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypesPublished by Association for Computing Machinery (ACM) ,1989
- Efficient implementation of the smalltalk-80 systemPublished by Association for Computing Machinery (ACM) ,1984
- The development of the SIMULA languagesACM SIGPLAN Notices, 1978
- Space/time trade-offs in hash coding with allowable errorsCommunications of the ACM, 1970