Memory cache and lisp: faster list processing via automatically rearranging memory

SIGSAM Bull. Pub Date : 2003-12-01 DOI:10.1145/968708.968711
R. Fateman
{"title":"Memory cache and lisp: faster list processing via automatically rearranging memory","authors":"R. Fateman","doi":"10.1145/968708.968711","DOIUrl":null,"url":null,"abstract":"The speed of modern computers can be increased by organizing computations so that memory access patterns correspond more closely to the memory cache-loading patterns implemented in the hardware. Rearranging code and data are each possible. Here we concentrate on automatic rearrangement of data, and examine the belief, common in some technical circles, that modern generational copying garbage collectors (GC) will improve data caching by relocating and compressing data, as a matter of normal processing. Since GC routines tend to be very well-tested and quite robust, if this belief can be confirmed by benchmarks, a GC could be a \"free\" way of reliably speeding up programs in practice.In fact, our tests show this speedup phenomenon can be measured in some but not all sample Lisp programs. A novelty in our tests (at least when this paper was written) was using a full Lisp system linked to free software (PAPI) to access hardware machine registers. PAPI allows us to count cache misses during full-speed computation. We conclude that after a GC cache misses may be significantly reduced in some examples. Reorganization by GC speeds up computation by as much by a factor of 4, but in some cases the effect is negligible (or may even slow computation slightly). In any case, no extra effort is required of the programmer or user to take advantage of the potential speedup.","PeriodicalId":314801,"journal":{"name":"SIGSAM Bull.","volume":"144 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2003-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"SIGSAM Bull.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/968708.968711","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

The speed of modern computers can be increased by organizing computations so that memory access patterns correspond more closely to the memory cache-loading patterns implemented in the hardware. Rearranging code and data are each possible. Here we concentrate on automatic rearrangement of data, and examine the belief, common in some technical circles, that modern generational copying garbage collectors (GC) will improve data caching by relocating and compressing data, as a matter of normal processing. Since GC routines tend to be very well-tested and quite robust, if this belief can be confirmed by benchmarks, a GC could be a "free" way of reliably speeding up programs in practice.In fact, our tests show this speedup phenomenon can be measured in some but not all sample Lisp programs. A novelty in our tests (at least when this paper was written) was using a full Lisp system linked to free software (PAPI) to access hardware machine registers. PAPI allows us to count cache misses during full-speed computation. We conclude that after a GC cache misses may be significantly reduced in some examples. Reorganization by GC speeds up computation by as much by a factor of 4, but in some cases the effect is negligible (or may even slow computation slightly). In any case, no extra effort is required of the programmer or user to take advantage of the potential speedup.
内存缓存和lisp:通过自动重新排列内存来更快地处理列表
通过组织计算,使内存访问模式更接近于硬件中实现的内存缓存加载模式,可以提高现代计算机的速度。重新排列代码和数据都是可能的。这里我们将集中讨论数据的自动重排,并检查在某些技术圈中常见的一种信念,即现代分代复制垃圾收集器(GC)将通过重定位和压缩数据来改进数据缓存,就像正常处理一样。由于GC例程往往经过了很好的测试并且非常健壮,如果这种信念可以通过基准测试得到证实,那么GC可能是在实践中可靠地加速程序的一种“免费”方式。实际上,我们的测试表明,这种加速现象可以在一些(但不是所有)示例Lisp程序中测量到。在我们的测试中(至少在撰写本文时),有一个新奇之处是使用链接到自由软件(PAPI)的完整Lisp系统来访问硬件机器寄存器。PAPI允许我们在全速计算期间计算缓存丢失。我们得出的结论是,在某些示例中,GC缓存丢失可能会显著减少。通过GC进行的重组将计算速度提高了4倍,但在某些情况下,这种影响可以忽略不计(甚至可能略微减慢计算速度)。在任何情况下,程序员或用户都不需要额外的努力来利用潜在的加速。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:604180095
Book学术官方微信