Project

General

Profile

Actions

Feature #4183

closed

Optimize Name::append with inplace Component construction

Added by Junxiao Shi almost 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Base
Target version:
Start date:
07/12/2017
Due date:
% Done:

0%

Estimated time:
1.50 h

Description

Currently, Name::append operates as:

  1. Construct a Component.
  2. 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:

  1. Introduce a Block::emplace_back method that construct a Block in-place at the end of m_elements.
  2. Call m_wire.emplace_back from Name::append overloads where applicable.
Actions

Also available in: Atom PDF