On 17 July 2015 at 11:02, André Somers <[email protected]> wrote: >> But I separated key and values into different containers, so even at optimum, >> you get two cache hits instead of one with QHash. As Ossi pointed out in the >> review, that's probably a pessimisation unless you have a very loaded >> container. Likewise, Optional<T>, required to mark entries as empty or >> occupied, isn't optimized at all. all but doubling the space required for >> most >> keys because of the pairing with a bool. >> >> As I said, it's WIP. >> > What might also be a consideration when making a container like this, is > that I find the key is often (not always of course) already part of the > value data structure. For instance, if I store employee records and key > them by id, that id is also in the record itself. It would be nice to > have a fast and friendly key-based container that could handle that > without duplicating the data...
Woah, a big +1 to that! _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
