[Development] HEADS-UP: QStringLiteral

Thiago Macieira thiago.macieira at intel.com
Wed Aug 21 17:55:40 CEST 2019


On Wednesday, 21 August 2019 08:18:08 PDT Tor Arne Vestbø wrote:
> > Oh, the following is nearly the most optimal:
> > 
> > 
> > 	test[u"key"] = u"value”;
> 
> 
> So that would be utf16, can’t we let test["key"] = “value” assume utf8, ie
> u8”foo” without the explicitness?

We can and already do that. But that's not optimal, since the UTF-8 algorithm 
has a cost.

That's why we are not removing QLatin1String: the Latin1 algorithm is as fast 
as memcpy. The only thing better than that is zero copies.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list