使用细粒度状态跟踪优化动态调度

Salikh Zakirov, S. Chiba, Etsuya Shibayama
{"title":"使用细粒度状态跟踪优化动态调度","authors":"Salikh Zakirov, S. Chiba, Etsuya Shibayama","doi":"10.1145/1869631.1869634","DOIUrl":null,"url":null,"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.","PeriodicalId":344101,"journal":{"name":"Dynamic Languages Symposium","volume":"54 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":"{\"title\":\"Optimizing dynamic dispatch with fine-grained state tracking\",\"authors\":\"Salikh Zakirov, S. Chiba, Etsuya Shibayama\",\"doi\":\"10.1145/1869631.1869634\",\"DOIUrl\":null,\"url\":null,\"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.\",\"PeriodicalId\":344101,\"journal\":{\"name\":\"Dynamic Languages Symposium\",\"volume\":\"54 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2010-10-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"4\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Dynamic Languages Symposium\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1869631.1869634\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Dynamic Languages Symposium","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1869631.1869634","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

摘要

动态mixin是Ruby和其他动态语言中可用的结构。它可以用作实现一系列编程范例的基础,例如动态面向方面编程和面向上下文编程。然而,在频繁的动态混合操作条件下,Ruby中当前动态混合实现的性能特征还有很多需要改进的地方,全局方法缓存和内联缓存丢失会导致显著的开销。在这项工作中,我们为CRuby 1实现了细粒度的状态跟踪。并且能够在微基准测试中提高6倍以上的性能,在极端情况下,全局方法缓存清理提高了4倍,细粒度状态跟踪提高了28%,通过缓存交替状态消除内联缓存缺失提高了12%。我们演示了一个使用动态mixins的小应用程序,该应用程序的性能通过我们的技术提高了48%。我们还在C语言中实现了一个更通用的委托对象模型,并提出了一个线程本地缓存算法,该算法允许在允许线程本地委托更改的同时减少内联缓存丢失。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Optimizing dynamic dispatch with fine-grained state tracking
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Optimizing MATLAB feval with dynamic techniques Whalesong: running racket in the browser All about the with statement in JavaScript: removing with statements in JavaScript applications Type refinement for static analysis of JavaScript TeJaS: retrofitting type systems for JavaScript
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1