Closed
Description
The differences between Deque
and Vector
might be considered small enough to consider removing Vector
and Sequence
, and rename Deque
to Sequence.
Advantages of Deque
:
- O(1) unshift and shift
Advantages of Vector
:
- 1.5x growth factor yields less average memory used than Deque's 2.0x
- Slightly faster access time due to not having to translate into the buffer.
Sequence
is also the only interface below Collection
.
The important question is: is it clear enough when you would use one over the other?