-
Notifications
You must be signed in to change notification settings - Fork 32
Description
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 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.
