Re: [Development] How bad QList really is

2020-05-18 Thread André Pönitz
On Wed, Apr 29, 2020 at 01:41:46AM +0200, Giuseppe D'Angelo via Development wrote: > Il 28/04/20 21:45, Matthew Woehlke ha scritto: > > > * QList gets adapted so that its internal array allocates 3 * > > > sizeof(void*) per element, so that e.g. Q6StringList won't require a > > > per-item allocati

Re: [Development] How bad QList really is

2020-04-28 Thread Christoph Feck
On 04/28/20 11:04, Kevin Kofler wrote: QList and QVector should remain as they are in Qt 5. But ... some developers are not able to understand the difference, so we need to remove one class!!1! ___ Development mailing list Development@qt-project.org

Re: [Development] How bad QList really is

2020-04-28 Thread Kevin Kofler
André Pönitz wrote: > [detailed analysis of QList] > If such a container did not exist it would need to be invented. Thanks for your analysis! This basically sums up what I have been arguing all this time, and brings up actual numbers to confirm it. QList and QVector should remain as they are in

Re: [Development] How bad QList really is

2020-04-27 Thread André Pönitz
On Tue, Apr 28, 2020 at 12:25:32AM +0200, Jean-Michaël Celerier wrote: >> As starters, there are 85 occurences of QList::takeFirst() in Qt >> Creator source code. Replacing these with QVector replaces a O(1) >> operation with an O(n) operation. > >Apologies if I'm wrong, but isn't Q

Re: [Development] How bad QList really is

2020-04-27 Thread Jean-Michaël Celerier
> As starters, there are 85 occurences of QList::takeFirst() in Qt Creator source code. Replacing these with QVector replaces a O(1) operation with an O(n) operation. Apologies if I'm wrong, but isn't QList::erase (and anything derivative) always O(N) ? With a lower cost than std::vector for thing

Re: [Development] How bad QList really is

2020-04-27 Thread André Pönitz
On Mon, Apr 27, 2020 at 11:13:26AM -0400, Matthew Woehlke wrote: > On 25/04/2020 10.49, André Pönitz wrote: > > We all know the story that began with > > > > "We knew for a long time that QList is not a good default > > container, despite what the documentation claims. The problem > >