Details
-
Improvement
-
Resolution: Won't Do
-
Major
-
None
-
master
Description
We want to investigate the use of an std::deque for the following reasons:
Reduces memory overhead. Since each element in a list has a forward and backward pointer.
Simplifies the cursor offset code, by allowing us to use a simple index.
There disadvantage of using a deque is that instead removing duplicate items we nullify them.
- Nullify - for dealing with duplicate entries in a deque data structure. We want to essentially remove the item from the deque, but as a delete is expensive (because it requires us to shift all items) we instead set the entry to null.
For workloads with high levels of duplication there is a potentially a relatively high overhead for skipping over the nullified items.