D26868: Move newItem to private method in KConfigSourceGenerator

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Tue Jan 28 22:29:46 GMT 2020


kossebau added a comment.


  In D26868#602150 <https://phabricator.kde.org/D26868#602150>, @dfaure wrote:
  
  > There is indeed a QString overload for concatenating QLatin1String, but it will have to be converted char-by-char (from 8 bits to 16 bits), so isn't it faster to concatenate QStringLiterals?
  
  
  I have never seen numbers, but any time I asked someone who might have seen numbers, they told me: QStringLiteral only for final strings not further modified or given to operations. Sadly cannot find references now, but I asked often the recent years.
  Looking at the code, the `qt_from_latin1` helper method might be as efficient on most processors as the `memcpy` is perhaps, and making up for any other overhead the QStringLiteral-generated code has, perhaps atomic stuff around the generated QString instance is expensive compared to the copy logic?
  
  But ready to hear from real Qt experts once more, perhaps with numbers this time :)

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D26868

To: tcanabrava, ervin, dfaure
Cc: kossebau, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200128/5500a795/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list