English

Fast Dynamic Arrays

Data Structures and Algorithms 2017-11-02 v1

Abstract

We present a highly optimized implementation of tiered vectors, a data structure for maintaining a sequence of nn elements supporting access in time O(1)O(1) and insertion and deletion in time O(nϵ)O(n^\epsilon) for ϵ>0\epsilon > 0 while using o(n)o(n) extra space. We consider several different implementation optimizations in C++ and compare their performance to that of vector and multiset from the standard library on sequences with up to 10810^8 elements. Our fastest implementation uses much less space than multiset while providing speedups of 40×40\times for access operations compared to multiset and speedups of 10.000×10.000\times compared to vector for insertion and deletion operations while being competitive with both data structures for all other operations.

Keywords

Cite

@article{arxiv.1711.00275,
  title  = {Fast Dynamic Arrays},
  author = {Philip Bille and Anders Roy Christiansen and Mikko Berggren Ettienne and Inge Li Gørtz},
  journal= {arXiv preprint arXiv:1711.00275},
  year   = {2017}
}
R2 v1 2026-06-22T22:32:44.198Z