Re: [Interest] QVectors vs QLists

2017-05-04 Thread André Somers
Hi, Op 03/05/2017 om 20:15 schreef Jason H: > >> Sent: Wednesday, May 03, 2017 at 1:53 PM >> From: "Konstantin Shegunov" >> To: "Jason H" >> Cc: "Qt Project" >> Subject: Re: [Interest] QVectors vs QLists >> >> I&#

Re: [Interest] QVectors vs QLists

2017-05-03 Thread Giuseppe D'Angelo
Il 03/05/2017 20:15, Jason H ha scritto: My calls to keys() are few, but they happen on large datasets. It sounds like I should just use QLists for keys() until Qt6. What's the key type? You mentioned qreal, QVector3D, etc.; those are terrible types for QList. Cheers, -- Giuseppe D'Angelo |

Re: [Interest] QVectors vs QLists

2017-05-03 Thread Konstantin Tokarev
03.05.2017, 21:09, "Sean Harmer" : > Hi, > > On 03/05/2017 17:57, Jason H wrote: >>  I have a app that does a lot of numeric processing,using quint32, qreal >> mostly (and occasional QVector3D). 10k-1M items in the data set. I generally >> do know the size of the dataset before I start adding t

Re: [Interest] QVectors vs QLists

2017-05-03 Thread Jason H
> Sent: Wednesday, May 03, 2017 at 1:53 PM > From: "Konstantin Shegunov" > To: "Jason H" > Cc: "Qt Project" > Subject: Re: [Interest] QVectors vs QLists > > I'll throw my 2 cents in, in addition to Sergio's comment on > ite

Re: [Interest] QVectors vs QLists

2017-05-03 Thread Sean Harmer
Hi, On 03/05/2017 17:57, Jason H wrote: I have a app that does a lot of numeric processing,using quint32, qreal mostly (and occasional QVector3D). 10k-1M items in the data set. I generally do know the size of the dataset before I start adding to it, so I call reserve() on it. Given that, and

Re: [Interest] QVectors vs QLists

2017-05-03 Thread Konstantin Shegunov
I'll throw my 2 cents in, in addition to Sergio's comment on iterator-based traversing. 1) If you don't absolutely need key ordering, I'd suggest a hash table (e.g. QHash) due to the amortized time lookup/insertion. If you use a numerical key for the QMap, I'd definitely consider switching to a ha

Re: [Interest] QVectors vs QLists

2017-05-03 Thread Sergio Martins
On 2017-05-03 17:57, Jason H wrote: I have a app that does a lot of numeric processing,using quint32, qreal mostly (and occasional QVector3D). 10k-1M items in the data set. I generally do know the size of the dataset before I start adding to it, so I call reserve() on it. Given that, and that I'v

[Interest] QVectors vs QLists

2017-05-03 Thread Jason H
I have a app that does a lot of numeric processing,using quint32, qreal mostly (and occasional QVector3D). 10k-1M items in the data set. I generally do know the size of the dataset before I start adding to it, so I call reserve() on it. Given that, and that I've been using QMap and QVector, when