[Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO

Thiago Macieira thiago.macieira at intel.com
Mon Jul 13 07:52:20 CEST 2015


On Monday 13 July 2015 00:45:00 Marc Mutz wrote:
> Since that was written, I have seen QVector create less executable code
> than  QList. In theory, QList should expand to less memory, but inefficient
> QLists, what with the heap allocations, probably uses more. Haven't
> investigated much.

Not only that, QVector shares code with QString and QByteArray, so the cost of 
using it is very small. QList still uses QListData.

It would have been better for both classes, but we ran out of time. I have 40 
or so changes on top of QString, QByteArray and QVector that make them even 
better. When we ran out of time, I was working on:

 * null d pointers
 * short string/array/vector optimisation
 * fixing QList to use QGenericArray

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list