[Development] QList for Qt 6

Thiago Macieira thiago.macieira at intel.com
Wed May 22 22:28:38 CEST 2019


On Wednesday, 22 May 2019 12:15:55 PDT Mutz, Marc via Development wrote:
> On 2019-05-22 18:25, Иван Комиссаров wrote:
> > What about fast prepend in [QList]
> 
> Please look at the source and do experiments. Years ago, I think I found
> that it's just not true. There's a prepend optimisation, yes, but it
> only kicks in if you _only_ do prepends. If you mix in but a single
> append, it falls apart. That's IIRC, AFAIR, etc.

More important than the prepend (unshift) optimisation, QQueue benefits from 
the takeFirst (shift) optimisation. That can be added to QVector by making by 
moving the begin pointer.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Development mailing list