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 _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
