[Development] RFC: Proposal for a semi-radical change in Qt APIs taking strings

Marc Mutz marc.mutz at kdab.com
Wed Oct 14 20:04:12 CEST 2015


On Wednesday 14 October 2015 18:11:26 Thiago Macieira wrote:
> and the fact that QStringLiterals don't share will cause the
> innocent-looking  above code require 64 bytes of read-only data.

They are shared, because it seems that lambdas within the same function have 
the same type. At least last I checked, that was what GCC implemented.

>         movq    _ZN10QArrayData18shared_static_dataE at GOTPCREL(%rip), %rax

And you want the nullptr to get rid of this relocation.

I like it!

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list