[Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
Smith Martin
Martin.Smith at theqtcompany.com
Sat Jul 11 21:50:05 CEST 2015
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?
And suppose the use case also assumes that you add all the elements to the container immediately and then you process the container sequentially immediately after that. So there is no inserting, no searching, and no other mallocs.
martin
________________________________________
From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Marc Mutz <marc.mutz at kdab.com>
Sent: Saturday, July 11, 2015 10:27 PM
To: development at qt-project.org
Subject: Re: [Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
On Saturday 11 July 2015 19:25:20 Thiago Macieira wrote:
> But Qt Creator was SO SLOW.... I noticed this when I tried to compile Qt
> and moc was horribly slow too.
Does QList still use a linear growth strategy instead of a geometric one? Same
problem, just less so. Technically still O(N²) behaviour.
--
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list