High-Performance Flexible Memory Allocators in Complex Projects

I. Trub
{"title":"High-Performance Flexible Memory Allocators in Complex Projects","authors":"I. Trub","doi":"10.1109/ISPRAS47671.2019.00010","DOIUrl":null,"url":null,"abstract":"The article proposes the methodology of data analysis and code design solutions to improve the flexibility of custom allocator assignment for simple data types and instances of data type classes. The methodology is based on special wrappers of memory functions, collecting data by the execution of source code, and analysing allocation/release traces with subsequent patterns extraction. Then the corresponding custom allocator is chosen for each pattern found and implemented in some module of source code as a container for user data, thus replacing malloc/free. The article describes the usage of the proposed approach for LLVM (Low Level Virtual Machine), which is a well-known tool for building compilers. It is shown that the choice of appropriate allocator provides the improvement of LLVM-based compiler's performance. An appropriate custom allocator is more effective than malloc, in particular, linear allocator is the best for StringMap and DomTreeNodeBase, stack allocator - for BitVector and linked list allocator - for Buckets. Aggregate performance improvement reaches around 10%. The methodology is implemented in shaders' compiler, but can be used in any project that uses LLVM or generally performs memory requests more or less intensively.","PeriodicalId":154688,"journal":{"name":"2019 Ivannikov Ispras Open Conference (ISPRAS)","volume":"117 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 Ivannikov Ispras Open Conference (ISPRAS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISPRAS47671.2019.00010","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The article proposes the methodology of data analysis and code design solutions to improve the flexibility of custom allocator assignment for simple data types and instances of data type classes. The methodology is based on special wrappers of memory functions, collecting data by the execution of source code, and analysing allocation/release traces with subsequent patterns extraction. Then the corresponding custom allocator is chosen for each pattern found and implemented in some module of source code as a container for user data, thus replacing malloc/free. The article describes the usage of the proposed approach for LLVM (Low Level Virtual Machine), which is a well-known tool for building compilers. It is shown that the choice of appropriate allocator provides the improvement of LLVM-based compiler's performance. An appropriate custom allocator is more effective than malloc, in particular, linear allocator is the best for StringMap and DomTreeNodeBase, stack allocator - for BitVector and linked list allocator - for Buckets. Aggregate performance improvement reaches around 10%. The methodology is implemented in shaders' compiler, but can be used in any project that uses LLVM or generally performs memory requests more or less intensively.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
复杂项目中的高性能灵活内存分配器
本文提出了数据分析方法和代码设计解决方案,以提高简单数据类型和数据类型类实例的自定义分配器分配的灵活性。该方法基于内存函数的特殊包装,通过执行源代码收集数据,并通过随后的模式提取分析分配/释放跟踪。然后为在源代码的某些模块中找到并实现的每个模式选择相应的自定义分配器作为用户数据的容器,从而取代malloc/free。本文描述了该方法在LLVM (Low Level Virtual Machine)中的用法,LLVM是一种构建编译器的知名工具。结果表明,选择合适的分配器可以提高基于llvm的编译器的性能。一个合适的自定义分配器比malloc更有效,特别是线性分配器对于StringMap和DomTreeNodeBase是最好的,堆栈分配器—对于BitVector和链表分配器—对于bucket。总性能提升达到10%左右。该方法在shaders的编译器中实现,但可以用于任何使用LLVM或通常或多或少密集执行内存请求的项目。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Computation Efficiency of S-CLSVOF Method for Additive Manufacturing Applications Data Assimilation Method for the Ocean Circulation Model NEMO and Its Application for the Calculation of Ocean Characteristics in the Arctic Zone of Russia Constexpr: A Great Good but Wrong Idea ISPRAS 2019 Invited Reports Deep Learning for Customs Classification of Goods Based on Their Textual Descriptions Analysis
×
引用
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