[New-bugs-announce] [issue27047] O(1) deque indexing
report at bugs.python.org
Tue May 17 15:41:40 EDT 2016
New submission from Serhiy Storchaka:
Proposed patch changes the complexity of deque indexing from linear to constant. All other operations preserves its amortized cost.
New deque implementation use two-level array instead of linked list. Since free space is reserved at both side, new blocks can be added at both sides for constant time. Memory consumption is almost the same.
components: Extension Modules
nosy: rhettinger, serhiy.storchaka
stage: patch review
title: O(1) deque indexing
versions: Python 3.6
Added file: http://bugs.python.org/file42879/deque_array.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce