Il 20/12/19 09:23, Lars Knoll ha scritto:
The result was that QHash has clear weaknesses compared to other implementations. It uses too much memory and certainly isn’t the fastest implementation. But std::unordered_map is just as bad, so there’s no point in using that to implement QHash.
Just to be devil's advocate, there is... As much as it's fun and everything implementing a container, just using std::unordered_map would have minimal effort on our side ("someone else's problem", and it's not even a random 3rd party, but a mandatory prerequisite for building Qt), and we can put in our API move-conversion between QHash / std::unordered_map.
I stopped thinking that Qt should provide "special" data structures (and for sure we should kill any QHash/QMap usage in our APIs); QHash can be as bad (or as good) as std::unordered_map, and if people need something more tailored for their use cases, there's plenty of 3rd parties to choose from. Or is there a political agenda here trying to promove QHash usage? :-)
Is the plan to also have QMap be backed by an hybrid solution (array-backed, etc.), or std::map, or something else?
My 2 c, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
