[Development] QList
NIkolai Marchenko
enmarantispam at gmail.com
Wed May 24 14:48:48 CEST 2017
A semi-sane idea that I think no one has suggested yet:
What if, starting from Qt6, QList becomes a wrapper for QArrayList with a
contructor from this type?
After all making existing code slightly _slower_ because of the wrapping
overhead is way less problematic than breaking it outright.
It will nudge the users of QLists that need to be fast to switch but will
leave users of "default no brainer container" happy as they likely wouldn't
even notice.
On Tue, May 23, 2017 at 5:27 PM, Thiago Macieira <thiago.macieira at intel.com>
wrote:
> On Tuesday, 23 May 2017 04:56:52 PDT Olivier Goffart wrote:
> > In my opinion for Qt6, we should make prepend, takeFirst amortized O(1)
> in
> > QVector.
>
> That is not very difficult once we move the begin pointer out of the d
> pointer
> and into the main QVector class. We need to add an interface to QArrayData
> to
> shrink and expand the buffer without relocating it. With that, we
> practically
> hide the allocated capacity information from QVector too.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
> Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170524/0b4ecfb5/attachment.html>
More information about the Development
mailing list