[Development] Views

Joerg Bornemann Joerg.Bornemann at qt.io
Thu Jun 6 08:24:57 CEST 2019


On 6/5/19 5:49 PM, Mutz, Marc via Development wrote:

> As a library implementer, you are simply not _allowed_ the freedom to 
> use a convenient tool over the most efficient one. That is, to put it 
> mildly, a disservice to users and a disgrace to the profession of 
> programmers. 8KiB just to look up a pointer in a map of {string, int}? 
> That's 1/4th of the icache size of many processors!
[...]

While I agree with this in general... every time we use a sorted vector 
as a dictionary replacement we're scattering implementation details all 
over the place, creating code that's much harder to read and easier to 
make mistakes in (*).

Maybe it's time for a general purpose dictionary class based on a sorted 
vector?


Cheers,

Joerg

*: No, that's not because I'm confusing familiarity with simplicity. The 
patch in question illustrates that very clearly.


More information about the Development mailing list