Skip to content

TrigInDetTriplet constructor: pass args by value

Apply the "pass-by-value idiom" to TrigInDetTriplet constructor. This way the compiler doesn't have to create a temporary in this call:

output.emplace_back(*pSPI, *pS, *pSPO, Q);

here:
https://gitlab.cern.ch/atlas/athena/blob/master/Trigger/TrigTools/TrigInDetPattRecoTools/src/TrigTrackSeedGenerator.cxx#L1182
thus removing an unnecessary copy, which should result in a small performance gain (because the code is called many times).

Tested with full menu on 2k events. The statistics are not very conclusive but there seems to be some effect.
Before:

$ trigDumpTimers.py -p Triplets expert-monitoring.root 
expert-monitoring.root
TrigFastTrackFinder_bjet/TIME_Triplets 3.792 +/- 0.529
TrigFastTrackFinder_bphysics/TIME_Triplets 0
TrigFastTrackFinder_electron/TIME_Triplets 3.165 +/- 0.182
TrigFastTrackFinder_fullScan/TIME_Triplets 799.192 +/- 52.666
TrigFastTrackFinder_muon/TIME_Triplets 11.975 +/- 0.578
TrigFastTrackFinder_muonIso/TIME_Triplets 6.556 +/- 0.854
TrigFastTrackFinder_muonLRT/TIME_Triplets 0
TrigFastTrackFinder_tau/TIME_Triplets 7.37 +/- 1.457
TrigFastTrackFinder_tauCore/TIME_Triplets 4.447 +/- 0.315
TrigFastTrackFinder_tauIso/TIME_Triplets 0.043 +/- 0.019

After:

$ trigDumpTimers.py -p Triplets expert-monitoring.root 
expert-monitoring.root
TrigFastTrackFinder_bjet/TIME_Triplets 3.875 +/- 0.611
TrigFastTrackFinder_bphysics/TIME_Triplets 0
TrigFastTrackFinder_electron/TIME_Triplets 3.038 +/- 0.189
TrigFastTrackFinder_fullScan/TIME_Triplets 788.877 +/- 53.828
TrigFastTrackFinder_muon/TIME_Triplets 11.562 +/- 0.513
TrigFastTrackFinder_muonIso/TIME_Triplets 6.056 +/- 0.756
TrigFastTrackFinder_muonLRT/TIME_Triplets 0
TrigFastTrackFinder_tau/TIME_Triplets 7.239 +/- 1.807
TrigFastTrackFinder_tauCore/TIME_Triplets 4.32 +/- 0.323
TrigFastTrackFinder_tauIso/TIME_Triplets 0.009 +/- 0.009

Average total event processing time changed from 544 +/- 43 to 530 +/- 41.

Also apply "the rule of zero" i.e. remove the explicitly default-defined copy constructor.

Merge request reports