Project

General

Profile

Necessary Maintenance #5281

Move to using make_shared() wherever possible and appropriate.

Added by Christopher Green over 5 years ago. Updated over 1 year ago.

Status:
Accepted
Priority:
Low
Assignee:
-
Category:
Infrastructure
Target version:
-
Start date:
01/28/2014
Due date:
% Done:

0%

Estimated time:
8.00 h
Scope:
Experiment:
SSI Package:
Duration:

Description

make_shared(), when used consistently in preference to shared_ptr<>(new ...), is significantly faster. Where it is straightforward to do, we should do this.

History

#1 Updated by Rob Kutschke over 5 years ago

Chris: maybe a short presentation at the stakeholders meeting would be a good idea? What's going on under the covers and where, in typical experimental code, is it important.

#2 Updated by Christopher Green over 5 years ago

  • Status changed from New to Accepted
  • Priority changed from Normal to Low
  • Estimated time set to 8.00 h

This is a, "low-hanging fruit" issue, making the code conform to current best practice and getting a performance improvement into the bargain. Basically the idea is to take advantage of the fact that make_shared allocates the memory for the reference counter contiguous with the saved object, and reducing the number of unnecessary shared_ptr copies by using references reduces the churn on the reference counter, thereby also improving performance. If experiments wish to do this in their own code there should be no issues with respect to whether or not art does the same thing (or vice versa).

#3 Updated by Christopher Green over 5 years ago

  • Tracker changed from Feature to Necessary Maintenance

#4 Updated by Christopher Green over 5 years ago

  • Description updated (diff)

#5 Updated by Kyle Knoepfel over 4 years ago

  • Target version set to 521

#6 Updated by Kyle Knoepfel over 1 year ago

  • Target version deleted (521)


Also available in: Atom PDF