On Tuesday 10 February 2015 13:26:50 Thiago Macieira wrote: > But given the choice, I would choose to do nothing. Instead, I have a patch > pending for Qt 6 that caches the Latin1 version of the QString in an extra > block past the UTF-16 data.
Sorry, I remembered wrong. I have a patch that sets a bit indicating whether the QString data is ASCII-only. If it is, then toUtf8() can actually use the faster toLatin1() conversion. But there's no memory caching because we need to return a QByteArray anyway. https://qt.gitorious.org/qt/thiago-intels-qtbase/source/master:src/corelib/tools/qstring.cpp#L4476 -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development