[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)
Knoll Lars
Lars.Knoll at theqtcompany.com
Tue Feb 10 16:33:23 CET 2015
On 09/02/15 15:56, "Oswald Buddenhagen"
<oswald.buddenhagen at theqtcompany.com> wrote:
>On Mon, Feb 09, 2015 at 03:30:06PM +0100, Marc Mutz wrote:
>> On Monday 09 February 2015 14:21:44 Rutledge Shawn wrote:
>> > But the advantage of Qt data structures is the implicit sharing.
>>
>> Cough, cough.
>>
>> http://www.gotw.ca/publications/optimizations.htm (watch the
>>publication date)
>>
>and what exactly is this supposed to tell us?
Not a whole lot? That Atomic COW is around 10% slower than a Plain string
(does Atomic COW use a fast allocator?) in the use case where you copy
strings once and modify them in 2/3 of the cases ;-)
Now the questions come: How does this corresponds to real world use cases?
How often on average do you modify a copied string? How often are our
users taking a copy of a string unintentionally (because they e.g. pass it
by value)? How does this overhead translate to more complex data
structures than a string? What’s the memory savings we get from using
implicit sharing and how does this help performance of the system as a
whole?
IMO there’s simply too many questions that this one example doesn’t answer
to conclude that what we are doing is bad.
Anyway, it’s mainly academic for now as we couldn’t change this before Qt
6.
Cheers,
Lars
More information about the Development
mailing list