【24h】

Cache and I/O Efficient Functional Algorithms

机译:高速缓存和I / O高效功能算法

获取原文

摘要

The widely studied I/O and ideal-cache models were developed to account for the large difference in costs to access memory at different levels of the memory hierarchy. Both models are based on a two level memory hierarchy with a fixed size primary memory (cache) of size M, an unbounded secondary memory organized in blocks of size B. The cost measure is based purely on the number of block transfers between the primary and secondary memory. All other operations are free. Many algorithms have been analyzed in these models and indeed these models predict the relative performance of algorithms much more accurately than the standard RAM model. The models, however, require specifying algorithms at a very low level requiring the user to carefully lay out their data in arrays in memory and manage their own memory allocation. In this paper we present a cost model for analyzing the memory efficiency of algorithms expressed in a simple functional language. We show how some algorithms written in standard forms using just lists and trees (no arrays) and requiring no explicit memory layout or memory management are efficient in the model. We then describe an implementation of the language and show provable bounds for mapping the cost in our model to the cost in the ideal-cache model. These bound imply that purely functional programs based on lists and trees with no special attention to any details of memory layout can be as asymptotically as efficient as the carefully designed imperative I/O efficient algorithms. For example we describe an O(n/B log_(M/B) n/B) cost sorting algorithm, which is optimal in the ideal cache and I/O models.
机译:开发了广泛研究的I / O和理想高速缓存模型,以解决在不同层次的存储器上访问存储器的成本差异。两种模型均基于两级存储器层次结构,其中固定大小的主存储器(缓存)的大小为M,无限制的二级存储器以大小为B的块组织。成本度量仅基于主块和主块之间的块传输数量。辅助内存。所有其他操作都是免费的。在这些模型中已经分析了许多算法,实际上,这些模型比标准RAM模型更准确地预测了算法的相对性能。但是,这些模型要求以非常低的级别指定算法,要求用户仔细地将其数据按阵列排列在内存中并管理自己的内存分配。在本文中,我们提出了一种成本模型,用于分析以简单功能语言表达的算法的存储效率。我们展示了一些仅使用列表和树(不使用数组)以标准形式编写且不需要显式内存布局或内存管理的算法在模型中的效率如何。然后,我们描述该语言的实现,并显示可证明的范围,用于将模型中的成本映射到理想缓存模型中的成本。这些限制意味着,基于列表和树的纯功能程序,无需特别关注内存布局的任何细节,就可以像精心设计的命令式I / O高效算法一样渐近地高效。例如,我们描述了一种O(n / B log_(M / B)n / B)成本排序算法,该算法在理想的缓存和I / O模型中是最佳的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号