[Development] Container benchmark was HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
Thiago Macieira
thiago.macieira at intel.com
Fri Jul 17 03:22:22 CEST 2015
On Friday 17 July 2015 00:02:52 Gunnar Roth wrote:
> Well my tests show that vector is only good with up to 100 elements, at
> least from 1000 and above it is a lot worse than QHash. What security
> concern do you mean when hash collide for a hash based container.
That's probably when you fall off the cliff of the cache size. With 1000
elements, the full data set does not fit in the L1d cache, so QHash is faster
because it produces fewer cache misses (fewer pages to be touched) given its
O(1)+collision search.
Anyway, basic algorithm class: a hashing table has O(1) search but it comes
with a cost.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list