
14 Jun
2009
14 Jun
'09
10:40 p.m.
AMDG Scott McMurray wrote:
2009/6/14 Christian Schladetsch <christian.schladetsch@gmail.com>:
I have since written rope<T, C>. This presents a sequence container to the user, using a list of vectors internally. T is the value_type, C is the ChunkSize. Each vector within the list-of-vectors is at least ChunkSize long.
It provides O(N/ChunkSize) access time to elements in the sequence. So it is slower than a vector, but faster than a list. The speed of access can be tuned by the user by varying the ChunkSize.
The main benefit of a rope over a vector is that a rope can grow indefinately without ever needing to be resized.
How does this differ from a deque?
deque has fixed size blocks In Christ, Steven Watanabe