Actions
Feature #4183
closedOptimize Name::append with inplace Component construction
Start date:
07/12/2017
Due date:
% Done:
0%
Estimated time:
1.50 h
Description
Currently, Name::append
operates as:
- Construct a
Component
. - Add it as a sub-element into Name's underly
Block
.
This incurs a copying of the Component
(same type as Block
).
This procedure can be optimized as:
- Introduce a
Block::emplace_back
method that construct aBlock
in-place at the end ofm_elements
. - Call
m_wire.emplace_back
fromName::append
overloads where applicable.
Updated by Junxiao Shi over 7 years ago
- Assignee set to Junxiao Shi
I can work on this after both https://gerrit.named-data.net/4014 and https://gerrit.named-data.net/4025 and https://gerrit.named-data.net/4030 are merged.
Updated by Junxiao Shi over 7 years ago
- Status changed from In Progress to New
- Assignee deleted (
Junxiao Shi)
I see very little benefits in using emplace_back
. Component
is a subclass of Block
, but I'm unable to call Component
constructor from std::vector<Block>::emplace_back
.
Updated by Junxiao Shi over 7 years ago
- Status changed from New to Rejected
As stated in note-3, there's no benefit pursuing this.
Actions