[Development] Qt6 source changes
Thiago Macieira
thiago.macieira at intel.com
Fri Nov 2 04:45:58 CET 2018
On Thursday, 1 November 2018 19:18:11 PDT Kevin Kofler wrote:
> Thiago Macieira wrote:
> > We're studying what to do with QList, but the idea is that the name
> > "QList" will be completely ok and identical to QVector. The technical
> > mechanism is in flux.
>
> That means you will be pessimizing element inserts and removals from O(n) to
> O(mn), where n is the length of the list and m the size of each element,
> without offering a good alternative without that pessimization (sure, you
> can use a QVector<T*> or QVector<SomeSmartPointer<T>>, but those have
> somewhat different semantics and less convenient syntax).
Yes. Is that a widespread use? And will it be a perceptible change?
Don't forget that m is a constant, for any given list. It's not a scalability
problem, since no matter how many inputs the user provides, the size of the
object will not change.
> It won't make a difference for implicitly-shared objects (but QList already
> works like a vector for those anyway), but for large in-place objects, it
> can make a big difference.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list