【24h】

An adaptive packed-memory array

机译:自适应打包内存数组

获取原文

摘要

The packed-memory array (PMA) is a data structure that maintains a dynamic set of N elements in sorted order in a Θ(N)-sized array. The idea is to intersperse Θ(N) empty spaces or gaps among the elements so that only a small number of elements need to be shifted around on an insert or delete. Because the elements are stored physically in sorted order in memory or on disk, the PMA can be used to support extremely efficient range queries. Specifically, the cost to scan L consecutive elements is O(1+L/B) memory transfers.This paper gives the first adaptive packed-memory array (APMA), which automatically adjusts to the input pattern. Like the original PMA, any pattern of updates costs only O(log2 N) amortized element moves and O(1+(log2 N)/B) amortized memory transfers per update. However, the APMA performs even better on many common input distributions achieving only O(logN) amortized element moves and O(1+(logN)/B) amortized memory transfers. The paper analyzes sequential inserts, where the insertions are to the front of the APMA, hammer inserts, where the insertions "hammer" on one part of the APMA, random inserts, where the insertions are after random elements in the APMA, and bulk inserts, where for constant α∈[0,1], Nα elements are inserted after random elements in the APMA. The paper then gives simulation results that are consistent with the asymptotic bounds. For sequential insertions of roughly 1.4 million elements, the APMA has four times fewer element moves per insertion than the traditional PMA and running times that are more than seven times faster.
机译:打包内存数组(PMA)是一种数据结构,该数据结构以Θ(N)的排序顺序维护动态的 N 个元素集。大小的数组。想法是在元素之间散布Θ(N)个空白或间隙,以便在插入或删除时仅需要转移少量元素。由于元素是按照物理顺序存储在内存或磁盘中的,因此PMA可用于支持极其有效的范围查询。具体来说,扫描 L 个连续元素的成本为 O(1 + L / B)内存转移。本文给出了第一个自适应打包内存阵列(APMA) ),它会自动调整为输入模式。与原始PMA一样,任何更新模式仅需花费 O (log 2 N )摊销元素移动和 O (1+(log 2 N)/ B)每次更新的摊销内存传输量。但是,APMA在许多常见输入分布上的表现甚至更好,仅实现 O (log N )摊销元素移动和 O (1+(log N)/ B)摊销的内存传输。本文分析了顺序插入物,其中插入物位于APMA的前端, hammer 插入物,其中插入物“锤子”位于APMA的一部分上,随机插入,其中插入在APMA中的随机元素之后;而大量插入,其中对于常数α∈[0,1], N α元素会在APMA中的随机元素之后插入。然后,本文给出了与渐近边界一致的仿真结果。对于大约140万个元素的顺序插入,APMA每次插入的元素移动量是传统PMA的四倍,并且运行时间快了七倍以上。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号