Skip to content
Snippets Groups Projects
Commit 31230200 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

RPC_CondCabling: optimize and cleanup CMAprogram

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.
parent 7096e7eb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment