skip to main content
10.1145/3302516.3307344acmotherconferencesArticle/Chapter ViewAbstractPublication PagesccConference Proceedingsconference-collections
research-article

Property caches revisited

Published:16 February 2019Publication History

ABSTRACT

Property caches are a well-known technique invented over 30 years ago to improve dynamic object accesses. They have been adapted to JavaScript, which they have greatly contributed to accelerate. However, this technique is applicable only when some constraints are satisfied by the objects, the properties, and the property access sites. In this work, we propose enhancements to improve two common usage patterns: prototype accesses and megamorphic accesses. We have implemented these in the Hopc AOT JavaScript compiler and we have measured their impact. We observe that they effectively complement traditional caches. They reduce cache misses and consequently accelerate execution. Moreover, they do not cause a slowdown in the handling of the other usage patterns.

References

  1. R. Artoul. 2015.Google ScholarGoogle Scholar
  2. Javascript Hidden Classes and Inline Caching in V8. http:// richardartoul.github.io/jekyll/update/2015/04/26/hidden-classes.html. (April 2015). D. Bevenius. 2018. Learning Google V8. https://github.com/danbev/learning-v8. (2018).Google ScholarGoogle Scholar
  3. C. F. Bolz, L. Diekmann, and L. Tratt. 2013. Storage Strategies for Collections in Dynamically Typed Languages. In ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications. 167–182. C. Bruni. 2017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Standard ECMA-262 - ECMAScript Language Specification (5.1 ed.). http://www.ecma-international.org/publications/standards/Ecma-262.htm ECMA International. 2015.Google ScholarGoogle Scholar
  5. Standard ECMA-262 - ECMAScript Language Specification (6.0 ed.). http://www.ecma-international.org/ecma-262/6.0/ A. Gal and et al. 2009. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2009, Dublin, Ireland, June 15-21, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 465–478. L. Gong, M. Pradel, and K. Sen. 2014.Google ScholarGoogle Scholar
  7. JITPROF: Pinpointing JIT-unfriendly JavaScript Code. Technical Report UCB/EECS-2014-144. Liang Gong, Michael Pradel, and Koushik Sen. 2015. JITProf: Pinpointing JIT-unfriendly JavaScript Code. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). ACM, New York, NY, USA, 357–368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Hass and et al. 2017. Bringing the Web Up to Speed with WebAssembly. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM, USA, 185–200. U. Hölzle, C. Chambers, and D. Ungar. 1991. Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP ’91). UK, 21–38. Microsoft. 2018. Chakra. https://github.com/Microsoft/ChakraCore/wiki/Resources. (2018). Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. Ratanaworabhan, B. Livshits, and B. G. Zorn. 2010. JSMeter: Comparing the Behavior of JavaScript Benchmarks with Real Web Applications. In Proceedings of the 2010 USENIX Conference on Web Application Development (WebApps’10). USA, 12. F. Schneider. 2012. High JavaSscript performance with V8. http://cs.au.dk/~jmi/VM/ IC-V8.pdf. (March 2012). M. Serrano. 2018. JavaScript AOT Compilation. In 14th Dynamic Language Symposium (DLS). Boston, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Design Elements. https://github.com/v8/v8/wiki/Design% 20Elements. (Nov. 2015). Henry S. Warren. 2002.Google ScholarGoogle Scholar

Index Terms

  1. Property caches revisited

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Other conferences
            CC 2019: Proceedings of the 28th International Conference on Compiler Construction
            February 2019
            204 pages
            ISBN:9781450362771
            DOI:10.1145/3302516

            Copyright © 2019 ACM

            Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 16 February 2019

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader