Guard the Cache: Dispatch Optimization in a Contextual Role-oriented Language
Research output: Contribution to book/Conference proceedings/Anthology/Report › Conference contribution › Contributed › peer-review
Contributors
Abstract
Adaptive programming models are increasingly important as context-dependent software conquers more domains. One such a model is role-oriented programming where behavioral changes are implemented by objects playing and renouncing roles. As with other adaptive models, the overhead introduced by source code adaptations is a major showstopper for role-oriented programs. This is in part because the optimizations of object-oriented virtual machines (VMs) do not provide the same performance gains when applied to role-oriented programs. Recently, dispatch plans have been shown to enable optimizations beyond those in VMs, thereby improving the performance of role programs with low variability. This paper introduces guarded dispatch plans, an extension of dispatch plans with a context-aware guarding mechanism that allows reuse in high-variability scenarios. Fine-grained guards use run-time feedback to partially reuse dispatch plans across call sites when contexts are changing. We present an algorithm to construct and compose guarded dispatch plans and provide a reference implementation of the approach. We show that our approach is able to gracefully degrade into a default dispatch approach when variability increases. The implementation is evaluated with synthetic benchmarks capturing different characteristics. Compared to the state-of-the-art implementation in ObjectTeams we achieved a mean speedup of 3.3 × in static cases, 3.0 × at low variability and the same performance in highly dynamic cases.
Details
Original language | English |
---|---|
Title of host publication | COP 2022 - Proceedings of the 14th International Workshop on Context-Oriented Programming and Advanced Modularity, Co-located with ECOOP 2022 |
Editors | Yudai Tanabe, Jens Lincke, Robert Hirschfeld, Atsushi Igarashi, Hidehiko Masuhara |
Publisher | Association for Computing Machinery |
Pages | 27-34 |
Number of pages | 8 |
ISBN (electronic) | 9781450399869 |
Publication status | Published - 7 Jun 2022 |
Peer-reviewed | Yes |
Publication series
Series | ECOOP: European Conference on Object-Oriented Programming |
---|
Conference
Title | 14th International Workshop on Context-Oriented Programming and Advanced Modularity, COP 2022 - Co-located with ECOOP 2022 |
---|---|
Duration | 7 June 2022 |
City | Berlin |
Country | Germany |
External IDs
ORCID | /0000-0002-5007-445X/work/160049129 |
---|
Keywords
ASJC Scopus subject areas
Keywords
- adaptive programming, context, dynamic dispatch, roles