On quarta-feira, 25 de abril de 2012 12.12.22, Olivier Goffart wrote:
> The problem is that this code might be slightly slower in some cases in
> C++98  due to the additional copy if qMove is not supported by the
> compiler. But the idea is that C++11 is going to be more widely adopted
> really soon. (And it is much faster according to my benchmark
> http://paste.kde.org/463334 )

Performance on C++98 is not an argument. Performance on C++11 is. If your
change makes it faster on C++11, then I'd support it as-is. See also my blog
"The value of passing by value"[1] which investigated another aspect of
passing by value.

However, I agree with you: it's too late to change it everywhere. Unless we do
it properly, it also has the potential to make things worse. I'd like to ask
you to find out where this is most important and do it now.

[1] http://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to