Hi Julian > Am 16.07.2015 um 23:43 schrieb Julien Blanc <[email protected]>: > > Le jeudi 16 juillet 2015 à 23:09 +0200, Gunnar Roth a écrit : > >> >> The vector classes are now very bad in this case. QHash is considerable >> better than any other. >> >> So I deduce from this test that for a container with up to 100 elements , >> std::vector is the best choice , if you want fastest lookup, but Vector >> should be avoided. For larger container QHash should be used for best lookup >> performance. > > Unless your vector content changes often, you should use a sorted vector and > a dichotomic search for that use case. Also note that hash are usually > subject to hash collision issues, which may be a security concern in certain > context : i wouldn’t recommend such a container for general purpose.
I assume dichotomic search is the same as binary search. 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. Have you some links about this topic? A google search for: hash container security gave no results in this direction. Regards, Gunnar _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
