TY - GEN
T1 - Who You Gonna Call: Analyzing the Run-time Call-Site Behavior of Ruby Applications
AU - Kaleba, Sophie
AU - Larose, Octave
AU - Jones, Richard
AU - Marr, Stefan
PY - 2022/12/7
Y1 - 2022/12/7
N2 - 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.
AB - 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.
KW - Analysis CallSite DynamicLanguages Inlining LookupCache MeMyPublication Splitting myown
UR - https://www.scopus.com/pages/publications/85147032462
U2 - 10.1145/3563834.3567538
DO - 10.1145/3563834.3567538
M3 - Conference proceedings
T3 - DLS
SP - 14
BT - Proceedings of the 18th Symposium on Dynamic Languages
A2 - De Meuter, Wolfgang
A2 - Guha, Arjun
PB - ACM
ER -