I disagree, but this isn't the place to discuss that.
Printable View
I disagree, but this isn't the place to discuss that.
I agree this is not the right thread.
I disagree that it's technically possible to add a large number of items to a linked list, no matter how well designed, compared to a vector that does block allocations. That's like saying "You can make a standard off-the-forecourt car go as fast as a dedicated race-car". Linked lists are good at certain things - like inserting or deleting single elements. But adding/deleting large numbers of elements is not one of the strengths of a linked list.
--
Mats
Doesn't matter. It's a matter of style when using it there.
Postfix increment/decrement are slower for custom objects, because they create a copy of the current object and return it by value, whereas prefix simply returns itself by reference.
For primitives, it makes no difference, but I like my programming style to not depend on the type of the variable I'm dealing with.