skip to main content
10.1145/2843915.2843919acmotherconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
short-paper

Call-target-specific method arguments

Published: 04 July 2015 Publication History

Abstract

Most efficient implementations of dynamically-typed programming languages use polymorphic inline caches to determine the target of polymorphic method calls, making method lookups more efficient. In some programming languages, parameters specified in method signatures can differ from arguments passed at call sites. However, arguments are typically specific to call sites, so they have to be converted within target methods. We propose call-target-specific method arguments for dynamically-typed languages, effectively making argument handling part of polymorphic inline cache entries. We implemented this concept in JRuby using the Truffle framework in order to make keyword arguments more efficient. Micro-benchmarks confirm that our implementation makes keyword argument passing in JRuby more than twice as fast.

References

[1]
S. Bansal. Multiple polymorphic arguments in single dispatch object oriented languages. In S. Ranka, A. Banerjee, K. Biswas, S. Dua, P. Mishra, R. Moona, S.-H. Poon, and C.-L. Wang, editors, Contemporary Computing, volume 95 of Communications in Computer and Information Science, pages 260--271. Springer Berlin Heidelberg, 2010. ISBN 978-3-642-14824-8.
[2]
C. F. Bolz, A. Cuni, M. Fijalkowski, and A. Rigo. Tracing the meta-level: Pypy's tracing jit compiler. In Proceedings of the 4th Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems, ICOOOLPS '09, pages 18--25, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-541-3.
[3]
L. Carlson and L. Richardson. Ruby Cookbook, 2nd Edition. O'Reilly Media, Inc., 2015. ISBN 978-1-4493-7371-9.
[4]
J. Y. Gil and K. Lenza. Keyword- and default- parameters in java. Journal of Object Technology, 11(1):1:1--17, Apr. 2012. ISSN 1660-1769.
[5]
S. Günther and T. Cleenewerck. Design principles for internal domain-specific languages: A pattern catalog illustrated by ruby. In Proceedings of the 17th Conference on Pattern Languages of Programs, PLOP '10, pages 3:1--3:35, New York, NY, USA, 2010. ACM. ISBN 978-1-4503-0107-7.
[6]
U. Hölzle, C. Chambers, and D. Ungar. Optimizing dynamically-typed object-oriented languages with polymorphic inline caches. In Proceedings of the European Conference on Object-Oriented Programming, ECOOP '91, pages 21--38, London, UK, UK, 1991. Springer-Verlag. ISBN 3-540-54262-0.
[7]
L. Rytz and M. Odersky. Named and default arguments for polymorphic object-oriented languages: A discussion on the design implemented in the scala language. In Proceedings of the 2010 ACM Symposium on Applied Computing, SAC '10, pages 2090--2095, New York, NY, USA, 2010. ACM. ISBN 978-1-60558-639-7.
[8]
M. Springer. Inter-language collaboration in an object-oriented virtual machine, 2013. Bachelor's thesis, Hasso Plattner Institute.
[9]
C. Wimmer and T. Würthinger. Truffle: A self-optimizing runtime system. In Proceedings of the 3rd Annual Conference on Systems, Programming, and Applications: Software for Humanity, SPLASH '12, pages 13--14, New York, NY, USA, 2012. ACM. ISBN 978-1-4503-1563-0.
[10]
T. Würthinger, A. Wöß, L. Stadler, G. Duboscq, D. Simon, and C. Wimmer. Self-optimizing ast interpreters. In Proceedings of the 8th Symposium on Dynamic Languages, DLS '12, pages 73--82, New York, NY, USA, 2012. ACM. ISBN 978-1-4503-1564-7.
[11]
T. Würthinger, C. Wimmer, A. Wöß, L. Stadler, G. Duboscq, C. Humer, G. Richards, D. Simon, and M. Wolczko. One vm to rule them all. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software, Onward! 2013, pages 187--204, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2472-4.
[12]
U. Zdun. Patterns of argument passing. In Proceedings of the 4th Nordic Conference of Pattern Language of Programs (Viking-PLoP2005), pages 1--25, 2005.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
ICOOOLPS '15: Proceedings of the 10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems
July 2015
51 pages
ISBN:9781450336574
DOI:10.1145/2843915
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 July 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JRuby
  2. PIC
  3. method arguments
  4. named arguments

Qualifiers

  • Short-paper

Conference

ECOOP '15

Acceptance Rates

Overall Acceptance Rate 11 of 14 submissions, 79%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 48
    Total Downloads
  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)1
Reflects downloads up to 20 Feb 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media