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.
Showing
- MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/CMakeLists.txt 6 additions, 9 deletions...Conditions/MuonCondCabling/RPC_CondCabling/CMakeLists.txt
- MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/CMAprogram.h 101 additions, 101 deletions...nCondCabling/RPC_CondCabling/RPC_CondCabling/CMAprogram.h
- MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/CMAprogram.cxx 11 additions, 741 deletions...itions/MuonCondCabling/RPC_CondCabling/src/CMAprogram.cxx
Loading
Please register or sign in to comment