[Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO

Milian Wolff milian.wolff at kdab.com
Sun Jul 12 00:10:08 CEST 2015


On Saturday, July 11, 2015 01:01:49 PM Thiago Macieira wrote:
> On Saturday 11 July 2015 19:50:05 Smith Martin wrote:
> > Suppose (as in the use case that started this thread) that your
> > QList/QVector/QLinkedList will only have a small number of elements in it.
> > Almost always less than 5. Never more than about 8. Does this change the
> > analysis at all? In particular, does it minimize the performance
> > differences?
> 
> The difference in performance is minimal on very small data sets, of course.

But if you create these small lists very often, then it's still there and 
accumulates to a measurable impact. Still, Martin, I really don't get what 
your point is. Even if it wouldn't be that bad, using QVector by default is 
still the right choice, and QList is /not/.

Bye
-- 
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5903 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150712/a32f4ed2/attachment.bin>


More information about the Development mailing list