[Development] Container benchmark was HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO

Tomasz Siekierda sierdzio at gmail.com
Fri Jul 17 11:13:58 CEST 2015


On 17 July 2015 at 11:02, André Somers <andre at familiesomers.nl> 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!



More information about the Development mailing list