[Development] Views

Mikhail Svetkin mikhail.svetkin at gmail.com
Thu May 16 22:23:28 CEST 2019


+ 1 for idea with Views.

All Qt containers are implicit shared. Why do we need to pay all the time
for implicit shared when we don't need it?
Qt containers are hard to integrate with 3rd-party libraries which use std
containers.

Also when we return a container we are always depend on the API of
container (Qt containers lack of new features, emplace,
polymorphic_allocator and etc …). If we will return a range (C++20 accepted
ranges) then we can provide better integration with other world and we will
pay for implicit shared only when we need it.

Best regards,
Mikhail


On Thu, 16 May 2019 at 21:39, Paolo Angelelli <paolo.angelelli at qt.io> wrote:

> I doubt adding one if condition to QMap insert and remove methods would be
> noticeable. I might be wrong. if i am and the user needs a QMap API with
> few elements, then the user should write a QListMap of some sort, not a
> QList and sprinkling the code with unnecessary for loops all over the
> place. From: André Pönitz Sent: Thursday, May 16, 20:46 Subject: Re:
> [Development] Views To: Paolo Angelelli Cc: development at qt-project.org On
> Thu, May 16, 2019 at 06:31:13PM +0000, Paolo Angelelli wrote: > i think you
> and alex stephanov are wrong. if QMap API is convenient, > but does not
> perform for the few elements use case, optimize QMap for > that use case,
> And then everybody else pays with cycles for the detection of the special
> use case. Oh, yeah. I only today run (again) across QDataStream
> performance. Super convenient, super flexible class. And easily beatable by
> a factor of ten in performance for each and every individual use case. So -
> no, you should not have to explain *each* use of a map to your manager but
> for central parts of performance critical sections you should think twice.
> Andre'
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190516/ccfa3c72/attachment.html>


More information about the Development mailing list