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