what are you doing with them? Vectors = arrays so if you sort them those large objects will be shifted around in memory if I'm not mistaken while with a list, which is a series of node pointers when sorting the huge objects won't have to be moved in memory they stay put so unless I'm way off my rocker there is no advantage for pointers unless a STL vector is the container.
However, when passing a STL container
Code:
list<myHugeObject> foo;
into a function as a parameter:
Code:
void bob(list<myHugeObject> a)
the entire list of your myHugeObjects would be duplicated to the function stack in which case making a copy of all those myHugeObjects would be time consuming whereas a list of pointers would just duplicate the pointers which is fast. However, if you use pointers:
Code:
list<myHugeObject*> foo
that means you have to dynamically create each object and push it onto the list and upon being done you would have to deallocate each object yourself. An easy way to avoid this problem and an identical method without the need to allocate and deallocate yourself would be to simply pass your list of huge objects to every function by reference
Code:
list<myHugeObject> foo;
void bob(list<myHugeObject> &a);
essentially equals
Code:
list<myHugeObject*> foo;
void bob(list<myHugeObject*> a);
Essentially in the terms both are equally as fast, but one requires you handling the memory yourself. Of course the pointer version allows you to sort the list "a" within the function without modifying foo. If you plan on moving these huge objects between your vectors/lists though, pointers would be ideal as an entire copy of your objects wouldn't have to be done.
I'm sure someone will correct any lies I've told you.. :P
Anyways I would say don't go dynamic unless you need to. Just depends what you are up to.
Code:
list<myHugeObject*> foo;
...
myHugeObject *obj1 = foo.front();
foo.pop_front();
is faster than
Code:
list<myHugeObject> foo;
...
myHugeObject obj1 = foo.front();
foo.pop_front();