MatchedRecHits (42% of tracking time post SMatrix!)

Chi2MeasurementEstimator

the Chi2MeasurementEstimator is still slow (15% of matched rec hits) .. why ?
  • we are copying and destroying a good amount of clhep matrices and vectors

TkStripMeasurementDet::recHits()

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

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2007-04-05 - GiovanniPetrucciani
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback