You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All calls related to getting the position of a cell use a DDSegmentation::BitFieldCoder object. The problem is, the function used absolutely everywhere is this one: long64 get(long64 bitfield, const std::string& name) const which does a std::map::find(name) instead of retrieving the index only once and using long64 get(long64 bitfield, size_t idx) const As this behaviour is in many very basic classes in DD4Hep::DDSegmentation and in FCCDetectors::DetSegmentation, it is used in many hot loops, and so this std::map::find amounts to 15% of the total CPU spent in my jobs... A priori the fix is simple, i.e get the indices from the strings in the initialization of the algorithms/tools, and then use the correct function.
.
The text was updated successfully, but these errors were encountered:
As reported by Nicolas Morange:
All calls related to getting the position of a cell use a DDSegmentation::BitFieldCoder object. The problem is, the function used absolutely everywhere is this one:
long64 get(long64 bitfield, const std::string& name) const
which does astd::map::find(name)
instead of retrieving the index only once and using long64 get(long64 bitfield, size_t idx) const
As this behaviour is in many very basic classes inDD4Hep::DDSegmentation
and inFCCDetectors::DetSegmentation
, it is used in many hot loops, and so this std::map::find amounts to 15% of the total CPU spent in my jobs... A priori the fix is simple, i.e get the indices from the strings in the initialization of the algorithms/tools, and then use the correct function..
The text was updated successfully, but these errors were encountered: