Skip to main content
Kent Academic Repository

Who You Gonna Call? Analyzing the Run-time Call-site Behaviour of Ruby Applications

Kaleba, Sophie, Larose, Octave, Jones, Richard, Marr, Stefan (2022) Who You Gonna Call? Analyzing the Run-time Call-site Behaviour of Ruby Applications. In: Proceedings of the 18th ACM SIGPLAN International Symposium on Dynamic Languages. . ACM ISBN 978-1-4503-9908-1. (doi:10.1145/3563834.3567538) (KAR id:97522)

Abstract

Applications written in dynamic languages are becoming larger and larger and companies increasingly use multi-million line codebases in production. At the same time, dynamic languages rely heavily on dynamic optimizations, particularly those that reduce the overhead of method calls.

In this work, we study the call-site behavior of Ruby benchmarks that are being used to guide the development of upcoming Ruby implementations such as TruffleRuby and YJIT. We study the interaction of call-site lookup caches, method splitting, and elimination of duplicate call-targets.

We find that these optimizations are indeed highly effective on both smaller and large benchmarks, methods and closures alike, and help to open up opportunities for further optimizations such as inlining. However, we show that TruffleRuby's splitting may be applied too aggressively on already-monomorphic call-sites, coming at a run-time cost. We also find three distinct patterns in the evolution of call-site behavior over time, which may help to guide novel optimizations. We believe that our results may support language implementers in optimizing runtime systems for large codebases built in dynamic languages.

Item Type: Conference or workshop item (Proceeding)
DOI/Identification number: 10.1145/3563834.3567538
Additional information: For the purpose of open access, the author has applied a CC BY public copyright licence (where permitted by UKRI, an Open Government Licence or CC BY ND public copyright licence may be used instead) to any Author Accepted Manuscript version arising.
Uncontrolled keywords: analysis call-site dynamic languages inlining lookup cache splitting
Subjects: Q Science > QA Mathematics (inc Computing science)
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Funders: Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Royal Society (https://ror.org/03wnrjx87)
Depositing User: Stefan Marr
Date Deposited: 27 Oct 2022 00:20 UTC
Last Modified: 18 Sep 2023 22:14 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/97522 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.