Skip to content

RPC_CondCabling: optimize and cleanup CMAprogram

Frank Winklmeier requested to merge fwinkl/athena:cmaprogram into master

Several cleanups and optimizations for CMAprogram:

  • move member initialization to header file
  • re-arrange data-members to reduce padding (checked with pahole)
  • use delegating constructors to reduce copy&paste
  • use compiler-generated copy constructor and assignment (not clear why these were hand-written and i.e. the now obsolete copy_threshold was a terribly slow implementation of an array copy)
  • replace hand-written loops over arrays with std::fill_n (in C++20 this may even turn into a constexpr)
  • replace "union-gymnastics" to initialize m_trig_edge_reg and m_pipe_* members with hard-coded values

This significantly reduces the time spent building the cabling in RpcCablingCondAlg (callgrind showed a hotspot in copy_threshold).

In passing cleanup cmake dependencies.

Relates to ATLASRECTS-1068.

Edited by Frank Winklmeier

Merge request reports