Thiago Macieira wrote: > So I'd like to propose a change to QList's allocation strategy. > > Option 1: large > 2*sizeof(void*) > - pros: will include double, QSharedPointer and QWeakPointer > - cons: does not include QVariant on 32-bit platforms, 75% overhead on int on > 32-bit > > Option 2: large > 16 bytes > - pros: includes double, the pointers and QVariant > - cons: overhead of 75% of int and pointers on 32-bit; 50% overhead of > pointers on 64-bit > > Option 3: make it QList<T> be an actual QVector<T> for movable types, maybe > with an upper limit of size (32 bytes, 128 bytes?). > - pros: suitable for all types, shares code > - cons: more complex to implement, more code to compile and parse in headers
Option 4: Move the decision out of QList<T>, so that there's a default policy does what we want for the types you mention, but we still allow users pick the behaviour for their own types. This would also allow us to tweak the strategy for future types. Cheers, João _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
