On Sunday 16 October 2011 18:59:08 Thiago Macieira wrote:
> On Sunday, 16 de October de 2011 17:12:33 Olivier Goffart wrote:
> > > One big difference between QList and QVector today is that QList has
> > > prepend / takeFirst optimisation, whereas QVector must move all
> > > elements to accommodate. I would prefer if that optimisation
> > > remained present.> 
> > It has to (it enable QList to be used for queue like data structure (and
> > it is, see QQueue)
> > 
> > QList was also supposed to expands to less code (than QVector) (at least
> > that is what Jasmin used to advertise some years ago)
> 
> I don't see how it can expand to less code than a simple vector. The best
> case scenario is to expand to the same code or to similar complexity --
> assuming of course that QVector is optimised to produce minimal code too.

Because QList make use of much more stuff in QListData that is not template 
type (hence, not generated for every types)
However, I beleive it is possible to do the same optimisation for movable type 
within QVector, if we want to.

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to