Performance » History » Version 1

Version 1/2 - Next » - Current version
pospelov, 29 Oct 2015 11:17


Performance

Performance related refactoring.

Screenshots below represents MacOS/Instrument/TimeProfiler report made for our App just before Release-1.4.

./bin/App --performance --batch

where I run 100 times test with CylindersInDWBA
TestPerformance::TestPerformance() {
    add("CylindersInDWBA",    "MaxiGISAS",    "CylindersInDWBABuilder", 100);
}

Following observations:

  • DecoratedLayerDWBASimulation::runProtected

7% of total time in SimulationElement construction. Can we do something with push_back?

  • DecoratedLayerDWBASimulation::CalculateCoherentIntensity

Don't understand why SimulationElement::getAlpha(), in code it should be getAlphaMean(). Anyway, 1.4% of total time there.

  • InterferenceFunctionStrategy::calculateFormFactorList

ScalarSpecularInfoMap::getInCoefficients - 14.5%. I made a quick test by placing them in the backup inside InterferenceFunctionStrategy and it gave about 10% of performance back as expected.
setLambdaAlphaPhi - 4%. It can be backed up too I guess.
Again SimulationElement::getAlpha() - 1.2%

  • FormFactorDWBA::evaluate

complex multiplication takes 1% of time

  • FormFactorDWBA::evaluate_for_q

Just lots of numeric, no conclusion

  • Going back in the tree to ScalarSpecularInfoMap::getOutCoefficients.

In takes 15% of whole performance, in the case of multi layers with lots of layers it will be even more.
1% for new operator. Can we employ something like memory pool with "placement new" for it?

  • SpecularMatrix::execute()

Hard to say, may be MultiLayerCoeff_t.resize() - 2.4% - can be somehow improved?

time_profiling1.png (45 KB) pospelov, 29 Oct 2015 10:29

time_profiling2.png (39.1 KB) pospelov, 29 Oct 2015 10:38

time_profiling3.png (68.5 KB) pospelov, 29 Oct 2015 10:51

time_profiling4.png (35.8 KB) pospelov, 29 Oct 2015 11:00

time_profiling5.png (47.8 KB) pospelov, 29 Oct 2015 11:05

time_profiling6.png (41.4 KB) pospelov, 29 Oct 2015 11:07

time_profiling7.png (61.7 KB) pospelov, 29 Oct 2015 11:15

time_profiling8.png (154 KB) pospelov, 29 Oct 2015 11:38

time_profiling9.png (64.9 KB) pospelov, 29 Oct 2015 11:40

time_profiling10.png (64.5 KB) pospelov, 29 Oct 2015 11:41