[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

Sean Harmer sean.harmer at kdab.com
Mon Feb 9 16:39:29 CET 2015

On Monday 09 Feb 2015 16:12:06 Marc Mutz wrote:
> On Monday 09 February 2015 15:56:28 Sean Harmer wrote:
> [...]
> > I guess depending upon the sizes of your key and value types and number of
> > elements and typical frequencies of operations (inserts vs lookups vs
> > removals) it may also possibly be better to use two vectors, one for the
> > keys and one for the values.
> > 
> > The rationale being that if your value type is large you reduce the number
> > of key values that can be stored in a cache line and therefore incur more
> > cache misses when performing lookups. Of course you would still incur at
> > least one cache miss when loading in the value to return.
> > 
> > It's surprising just how expensive cache misses are these days compared to
> > traditionally thought-to-be-expensive CPU instructions.
> > 
> > Anyway, if somebody does implement a nice wrapper around such sorted
> > vectors with sufficient controls to force/not-force the sorted invariant
> > to allow efficient insertion/removal vs efficient lookups, we have a ton
> > of places in Qt3D where you could test such a beast. :)
> Ah, the pleasure! Someone not only understands the arguments, but lifts them
> to the next level, too.
> This one is for you:
>   https://codereview.qt-project.org/105743
> (completely unfinished, you can't even remove elements)

Great! Looks very promising. If you want to try it out in Qt3D as private API 
to let it mature before moving it to QtCore, then please feel free.


Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions

More information about the Development mailing list