MatchedRecHits (42% of tracking time post SMatrix!)
the
Chi2MeasurementEstimator is still slow (15% of matched rec hits) .. why ?
- we are copying and destroying a good amount of clhep matrices and vectors
22% of the time foes into
TkStripMeasurementDet::recHits. of which 15% in
StriupCPEfromTrackAngle::localParameters(cluster,
LocalTrajectoryParameters)... can we optimize it ? (not easy ... apparently it has real things to do)
Main stuff
All the rest goes into
SiStripRecHitMatcher::match()
- 7% in pow(x,2)!!
- 8% in project
- 18% in creating and destroying CLHEP vectors
- 28% in CLHEP::solve() (of which half in CLHEP copy constructors!) (for a 2x2 linear equation system !!!!!!!!!!!)
Other nice stuff:
- we compute both sin() and cos() of the same angle ... maybe there is no need (besides, is there a c++ function that computes sin and cos with the correct signs in one step ? there is an x87 opcode for this, so I'm surprised of not finding the function....)
Now I'm trying to replace: pow(x,2) with
template <class T> inline const T sqr(const T a) { return a*a; }
(but I'm not sure if the inlining is done ... otherwise I should fit the result in a temporary variable and do
x*x
by hand)
Also, I'm replacing CLHEP with SMatrix ... even if the 2x2 system can be probably simplified, optimized and solved by hand
--
GiovanniPetrucciani - 05 Apr 2007