Thiago Macieira wrote:
> The total memory allocated for QList is always equal to or bigger than
> QVector for the same size, regardless of T. So in addition to having the
> same memory size, you access the data through one extra indirection.

I was talking about speed, not memory consumption.

> The only benefit QList has is that it's really quick to resize and insert
> at any point compared to a QVector of a complex or large type.

That was my point (especially the "insert at any point" case). (And you 
forgot "remove at any point", which is like "insert at any point" except for 
moving in the other direction.)

The speed difference can be arbitrarily large. Even infinite if the type is 
not movable and the copy constructor or the destructor does not halt. ;-)

        Kevin Kofler

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to