>> 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...)std::unordered_map is before all an interface and the implemenation varies according to the library supplier. And this, potentially much more eg. than std::vector. And X-Platorm Qt users would expect performance consistency I guess. The research of the "ultimate map" is a hot topic. There is of course not a single implementation that have all benefits. But Lars' implementation is something that works in many scenarios and that would bring value to Qt users. The performances are not "just a bit better" than with the Qt 5 or std implementations, there are way better, if you look at the diagrams. And that's the whole point of Lars' proposal. Worth to spot Matt Kulukundis's conference about the importance of map performance topic: https://youtu.be/ncHmEUmJZf4?t=209 Philippe On Fri, 20 Dec 2019 11:47:55 +0100 Giuseppe D'Angelo via Development <[email protected]> wrote: > 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 isnt the fastest > > implementation. But std::unordered_map is just as bad, so theres 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 > _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
