D9236: Fill lists of default-constructed types directly, not append any by value
Aaron Puchert
noreply at phabricator.kde.org
Fri Dec 8 21:04:40 UTC 2017
aaronpuchert added a comment.
It might not actually be faster though, because you go through the memory twice. If the vector doesn't fit into the cache, that could introduce quite some slowdown.
On the other hand, copying deep objects can obviously be costly. Some of the vector element types seem to carry around some baggage.
The C++11 way would be to move such objects, can we do that? It seems to be supported via `QVector<T>::push_back(T&& t)`.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D9236
To: kossebau, #kdevelop
Cc: aaronpuchert, brauch, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171208/bf175fcc/attachment.html>
More information about the KDevelop-devel
mailing list