lars.knoll at qt.io
Mon May 20 12:59:05 CEST 2019
> On 17 May 2019, at 21:12, Giuseppe D'Angelo via Development <development at qt-project.org> wrote:
> Il 17/05/19 16:46, Bernhard Lindner ha scritto:
>>> I've done this experiment for QMap / QHash / QSet, where keeping COW at
>>> the cost of an extra indirection (dptr -> [refcount + std:: class] ->
>>> actual data) is more acceptable since these classes jump all over the
>>> memory anyhow. Basically "it worked", still requiring a few changes
>>> though, e.g. std::unordered_map iterators are forward, QHash ones are
>>> bidirectional. If the SIC is acceptable, something to consider for Qt 6.
>> Are there any plans/discussions how to procede with that experiment?
> It was worth a try after we discussed this possibility a couple of years ago at QtCS. I don't know if it's still interesting to pursue.
I’ve tried the same thing and it seems possible to implement this in a more or less source compatible way. One problem with QMap/QHash is the insertMulti() functionality and the fact that hash and multi_hash are not two separate types. But that is something I would very much like to deprecate in Qt 5.15 already (by deprecating insertMulti()).
More information about the Development