Regarding commit 049175604 (fix compile with QT_USE_FAST_CONCATENATION....)

Milian Wolff mail at milianw.de
Thu Aug 11 14:27:45 UTC 2011


David Nolden, 11.08.2011:
> 2011/8/11 Aleix Pol <aleixpol at kde.org>:
> > On Thu, Aug 11, 2011 at 4:05 PM, David Nolden <zwabel at googlemail.com> 
wrote:
> >> I think this makes the code uglier, without any gain. All of the
> >> changed code-locations are not performance relevant.
> >> 
> >> Basically all the changes are:
> >> 
> >> myString + "myText"
> >> ->
> >> QString(myString + "myText")
> >> 
> >> Which is the opposite of natural. So why do this?
> >> 
> >> --
> >> KDevelop-devel mailing list
> >> KDevelop-devel at kdevelop.org
> >> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
> > 
> > That happens because with this change + returns a QStringBuilder.
> > It makes string concatenation to work much faster so I think it's a good
> > trade off.
> > Aleix
> 
> The trade-off is "no gain" vs. "uglier code". That's good for you?

no-gain in a few cases, some gain in a few others. And as I said: using % (or 
even the fast-operator-plus define) is not ugly nor slow.

bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110811/5aa442a9/attachment.sig>


More information about the KDevelop-devel mailing list