On Feb 28, 2014, at 2:16 PM, Martin Owens wrote:
On Fri, 2014-02-28 at 11:25 -0800, Jon Cruz wrote:
> Unless performance actually is measured to be significantly different,
> std::vector<> should be the 'go to' solution. People often think they
> have a case where a list is better, but once you start to count up
> times iterating the list vs times modifying it, std::vector<> is
> almost always better in practice.
This list is a low write, low read, low iteration, low count list. Your
description doesn't say what the specific advantages are so it's hard to
be sure what you're recommending.
Although you are right that a document maybe referenced by more than one
href in the same document; although not in multiple opened documents
because of where the list is.
At least for now I don't believe we're going to suffer any performance
problems.
The key point is that unless we have something high traffic for modifies but not iteration
nor random access, then we should use vector over list. Sans performance issues, vector
should be preferred.
In other words, for C++ coding "use a list" means "implement via
std::vector"