On 02.11.18 09:20, Ulf Hermann wrote:
Depends on usage.See e.g. 551efd91990e07902e5324f720cf5585865c323d QmlProfiler: Use QList for QmlRange container when loading .qtdAs we are using this as a queue, with many calls to takeFirst(), aQVector is prohibitively expensive here.I should have used QQueue there, and that will hopefully still be a linked(-ish) list in Qt6. Or it might become a ring buffer, but please not a plain vector. If we don't want to keep QQueue, I will still have the option to use an equivalent std container there (+/- implicit sharing).
Right, in this case std::deque would probably be a better fit. You do not need implicit sharing, and std::deque still tries to optimize for cache, and will not call the move constructor on every element each time it has to "re-locate"
(We should probably deprecate QQueue right now and tell people to use std::deque) -- Olivier Woboq - Qt services and support - https://woboq.com - https://code.woboq.org _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
