Abstract
Dynamic mixin is a construct available in Ruby and other dynamic languages. It can be used as a base to implement a range of programming paradigms, such as dynamic aspect-oriented programming and context-oriented programming. However, the performance characteristics of current implementation of dynamic mixin in Ruby leaves much to be desired under condition of frequent dynamic mixin operations, global method cache and inline cache misses incur significant overhead. In this work we implemented fine-grained state tracking for CRuby 1. and were able to improve performance by more than six times on the microbenchmark exercising extreme case flowing 4 times to global method cache clearing, 28% to fine-grained state tracking and further 12% to inline cache miss elimination by caching alternating states. We demonstrated a small application using dynamic mixins that gets 48% improvement in performance from our techniques. We also implemented in C a more general delegation object models and proposed an algorithm of thread-local caching, which allows to reduce inline cache misses while permitting thread-local delegation changes.
- }}G. Bracha and W. Cook. Mixin-based inheritance. In Proceedings OOPSLA/ECOOP '91, LNCS 512, pages 303--311. ACM, 1990. Google Scholar
Digital Library
- }}C. Chambers, D. Ungar, and E. Lee. An efficient implementation of self, a dynamically-typed object-oriented language based on prototypes. LISP and Symbolic Computation, 4 (3): 243--281, 1991. Google Scholar
Digital Library
- }}C. Chambers, J. Dean, and D. Grove. A framework for selective recompilation in the presence of complex intermodule dependencies. Software Engineering, International Conference on, 0: 221, 1995. Google Scholar
Digital Library
- }}D. Chisnall. Updating objective-c. Technical report, Swansea University, 2008.Google Scholar
- }}D. Chisnall. A modern objective-c runtime. Journal of Object Technology, 8 (1): 221--240, Jan 2009.Google Scholar
Cross Ref
- }}B. Cox and A. Novobilski. Object-oriented programming: an evolutionary approach. Addison-Wesley, 1986. Google Scholar
Digital Library
- }}D. Detlefs and O. Agesen. Inlining of virtual methods. In Proceedings ECOOP '99, LNCS 1628, pages 258--277, 1999. Google Scholar
Digital Library
- }}L. P. Deutsch and A. M. Schiffman. Efficient implementation of the smalltalk-80 system. In POPL '84: Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pages 297--302, New York, NY, USA, 1984. Google Scholar
Digital Library
- }}M. Furr, J.-h. D. An, and J. S. Foster. Profile-guided static typing for dynamic scripting languages. In OOPSLA '09: Proceeding of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications, pages 283--300, New York, NY, USA, 2009. Google Scholar
Digital Library
- }}N. Grcevski, A. Kielstra, K. Stoodley, M. Stoodley, and V. Sundaresan. Java just-in-time compiler and virtual machine improvements for server and middleware applications. In 3rd Virtual Machine Research and Technology Symposium (VM), 2004. Google Scholar
Digital Library
- }}M. Haupt and H. Schippers. A machine model for aspect-oriented programming. In Proceedings ECOOP '09, LNCS 4609, pages 501--524, 2007. Google Scholar
Digital Library
- }}R. Hirschfeld, P. Costanza, and O. Nierstrasz. Context-oriented programming. Journal of Object Technology, 7 (3): 125--151, 2008.Google Scholar
Cross Ref
- }}G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. Griswold. An overview of AspectJ. In Proceedings ECOOP '01, LNCS 2072, pages 327--354, 2001. Google Scholar
Digital Library
- }}enböck, Rodriguez, Russell, and Cox}hotspot6T. Kotzmann, C. Wimmer, H. Mössenböck, T. Rodriguez, K. Russell, and D. Cox. Design of the java HotSpot™ client compiler for java 6. ACM Trans. Archit. Code Optim., 5 (1): 1--32, 2008. Google Scholar
Digital Library
- }}G. Krasner, editor. Smalltalk-80: bits of history, words of advice. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1983. Google Scholar
Digital Library
- }}H. Lieberman. Using prototypical objects to implement shared behavior in object-oriented systems. ACM SIGPLAN Notices, 21 (11): 214--223, 1986. Google Scholar
Digital Library
- }}I. Piumarta and A. Warth. Open, extensible object models. Self-Sustaining Systems, 5146: 1--30, 2008. Google Scholar
Digital Library
- }}A. Popovici, T. Gross, and G. Alonso. Dynamic weaving for aspect-oriented programming. In AOSD '02: Proceedings of the 1st international conference on Aspect-oriented software development, pages 141--147, New York, NY, USA, 2002. Google Scholar
Digital Library
- }}K. Sasada. Efficient implementation of Ruby virtual machine. PhD thesis, The University of Tokyo, Graduate school of information science and technology, 2007. In japanese language.Google Scholar
- }}H. Schippers, M. Haupt, and R. Hirschfeld. An implementation substrate for languages composing modularized crosscutting concerns. In Proceedings of the 2009 ACM symposium on Applied Computing, pages 1944--1951. ACM New York, NY, USA, 2009. Google Scholar
Digital Library
- }}et al.(2009)Villazón, Binder, Ansaloni, and Moret}hotwaveA. Villazón, W. Binder, D. Ansaloni, and P. Moret. Hotwave: creating adaptive tools with dynamic aspect-oriented programming in java. In Proceedings GPCE '09: Proceedings of the eighth international conference on Generative programming and component engineering, pages 95--98. ACM, 2009. Google Scholar
Digital Library
- }}J. Vitek and R. Horspool. Compact dispatch tables for dynamically typed object oriented languages. In Compiler Construction '96, LNCS 1060, pages 309--325. Springer, 1996. Google Scholar
Digital Library
Index Terms
Optimizing dynamic dispatch with fine-grained state tracking
Recommendations
Optimizing dynamic dispatch with fine-grained state tracking
DLS '10: Proceedings of the 6th symposium on Dynamic languagesDynamic mixin is a construct available in Ruby and other dynamic languages. It can be used as a base to implement a range of programming paradigms, such as dynamic aspect-oriented programming and context-oriented programming. However, the performance ...
Dynamic fine-grained sparse memory accesses
MEMSYS '18: Proceedings of the International Symposium on Memory SystemsApplications from big data analytics, machine learning, and high performance computing, amongst others, operate on large inputs, which can place capacity pressure on caches. Further, some rely on operations over a dynamically determined subset of the ...







Comments