D9236: Fill lists of default-constructed types directly, not append any by value
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Fri Dec 8 01:01:48 UTC 2017
kossebau added a comment.
In https://phabricator.kde.org/D9236#177318, @brauch wrote:
> Is this actually faster? Why?
It saves a copy constructor and destructor call per list item.
Old code:
alloc heap memory for list items
for each item
default constructor item on stack
setup item on stack
copy constructor for item on heap from item on stack
destructor item on stack
New code:
alloc heap memory for list items
for each item
default constructor item on heap
for each item
setup item on heap
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D9236
To: kossebau, #kdevelop
Cc: brauch, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171208/2857e84f/attachment.html>
More information about the KDevelop-devel
mailing list