Optimizing Sideways Composition: Fast Context-oriented Programming in ContextPyPy

Tobias Pape, T. Felgentreff, R. Hirschfeld
{"title":"Optimizing Sideways Composition: Fast Context-oriented Programming in ContextPyPy","authors":"Tobias Pape, T. Felgentreff, R. Hirschfeld","doi":"10.1145/2951965.2951967","DOIUrl":null,"url":null,"abstract":"The prevalent way of code sharing in many current object systems is static and/or single inheritance; both are limiting in situations that call for multi-dimensional decomposition. Sideways composition provides a technique to reduce their limitations. Context-oriented programming (COP) notably applies sideways composition to achieve better modularity. However, most COP implementations have a substantial performance overhead. This is partly because weaving and execution of layered methods violate assumptions that common language implementations hold about lookup. Meta-tracing just-in-time (JIT) compilers have unique characteristics that can alleviate the performance overhead, as they can treat lookup differently. We show that meta-tracing JIT compilers are good at optimizing sideways composition and give initial, supporting results. Furthermore, we suggest that explicit communication with the JIT compiler in a COP implementation can improve performance further.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2951965.2951967","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 10

Abstract

The prevalent way of code sharing in many current object systems is static and/or single inheritance; both are limiting in situations that call for multi-dimensional decomposition. Sideways composition provides a technique to reduce their limitations. Context-oriented programming (COP) notably applies sideways composition to achieve better modularity. However, most COP implementations have a substantial performance overhead. This is partly because weaving and execution of layered methods violate assumptions that common language implementations hold about lookup. Meta-tracing just-in-time (JIT) compilers have unique characteristics that can alleviate the performance overhead, as they can treat lookup differently. We show that meta-tracing JIT compilers are good at optimizing sideways composition and give initial, supporting results. Furthermore, we suggest that explicit communication with the JIT compiler in a COP implementation can improve performance further.
优化横向组合:快速上下文导向的ContextPyPy编程
在许多当前对象系统中,代码共享的流行方式是静态和/或单继承;在需要多维分解的情况下,两者都是有限的。横向构图提供了一种技术来减少它们的局限性。面向上下文的编程(COP)主要应用横向组合来实现更好的模块化。然而,大多数COP实现都有很大的性能开销。这在一定程度上是因为分层方法的编织和执行违反了公共语言实现对查找的假设。元跟踪即时(JIT)编译器具有独特的特性,可以减轻性能开销,因为它们可以以不同的方式处理查找。我们展示了元跟踪JIT编译器擅长优化横向组合,并给出了初始的支持结果。此外,我们建议在COP实现中与JIT编译器显式通信可以进一步提高性能。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信