ShortCut: Architectural support for fast object access in scripting languages

Jiho Choi, Thomas Shull, Maria J. Garzaran, Josep Torrellas

Research output: Chapter in Book/Report/Conference proceedingConference contribution

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 signifcantly improve the effciency 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.

Original languageEnglish (US)
Title of host publicationISCA 2017 - 44th Annual International Symposium on Computer Architecture - Conference Proceedings
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages494-506
Number of pages13
ISBN (Electronic)9781450348928
DOIs
StatePublished - Jun 24 2017
Event44th Annual International Symposium on Computer Architecture - ISCA 2017 - Toronto, Canada
Duration: Jun 24 2017Jun 28 2017

Publication series

NameProceedings - International Symposium on Computer Architecture
VolumePart F128643
ISSN (Print)1063-6897

Other

Other44th Annual International Symposium on Computer Architecture - ISCA 2017
CountryCanada
CityToronto
Period6/24/176/28/17

Keywords

  • Inline Caching
  • JavaScript
  • Microarchitecture
  • Scripting Language

ASJC Scopus subject areas

  • Hardware and Architecture

Fingerprint Dive into the research topics of 'ShortCut: Architectural support for fast object access in scripting languages'. Together they form a unique fingerprint.

  • Cite this

    Choi, J., Shull, T., Garzaran, M. J., & Torrellas, J. (2017). ShortCut: Architectural support for fast object access in scripting languages. In ISCA 2017 - 44th Annual International Symposium on Computer Architecture - Conference Proceedings (pp. 494-506). (Proceedings - International Symposium on Computer Architecture; Vol. Part F128643). Institute of Electrical and Electronics Engineers Inc.. https://doi.org/10.1145/3079856.3080237