TY - GEN
T1 - An adaptive packed-memory array
AU - Bender, Michael A.
AU - Hu, Haodong
PY - 2006
Y1 - 2006
N2 - The packed-memory array (PMA) is a data structure that maintains a dynamic set of N elements in sorted order in a T(N)-sized array. The idea is to intersperse T(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. Specifi-cally, 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+(log2N)/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 equential 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.
AB - The packed-memory array (PMA) is a data structure that maintains a dynamic set of N elements in sorted order in a T(N)-sized array. The idea is to intersperse T(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. Specifi-cally, 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+(log2N)/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 equential 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.
KW - Adaptive packed-memory array
KW - Cache oblivious
KW - Locality preserving
KW - Packed-memory array
KW - Range query
KW - Rebalance
KW - Sequential file maintenance
KW - Sequential scan
KW - Sparse array
UR - https://www.scopus.com/pages/publications/34250669251
U2 - 10.1145/1142351.1142355
DO - 10.1145/1142351.1142355
M3 - Conference contribution
AN - SCOPUS:34250669251
SN - 1595933182
SN - 9781595933188
T3 - Proceedings of the ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems
SP - 20
EP - 29
BT - Proceedings of the Twenty-Fifth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS 2006
T2 - 25th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS 2006
Y2 - 26 June 2006 through 28 June 2006
ER -