Performance » History » Version 1

pospelov, 29 Oct 2015 11:17

1 1 pospelov
h1. Performance
2 1 pospelov
3 1 pospelov
h5. Performance related refactoring.
4 1 pospelov
5 1 pospelov
Screenshots below represents MacOS/Instrument/TimeProfiler report made for our App just before Release-1.4.
6 1 pospelov
<pre>
7 1 pospelov
./bin/App --performance --batch
8 1 pospelov
9 1 pospelov
where I run 100 times test with CylindersInDWBA
10 1 pospelov
TestPerformance::TestPerformance() {
11 1 pospelov
    add("CylindersInDWBA",    "MaxiGISAS",    "CylindersInDWBABuilder", 100);
12 1 pospelov
}
13 1 pospelov
</pre>
14 1 pospelov
15 1 pospelov
16 1 pospelov
Following observations:
17 1 pospelov
18 1 pospelov
* DecoratedLayerDWBASimulation::runProtected
19 1 pospelov
> 7% of total time in SimulationElement construction. Can we do something with push_back?
20 1 pospelov
!time_profiling1.png!
21 1 pospelov
22 1 pospelov
* DecoratedLayerDWBASimulation::CalculateCoherentIntensity
23 1 pospelov
> Don't understand why SimulationElement::getAlpha(), in code it should be getAlphaMean(). Anyway, 1.4% of total time there.
24 1 pospelov
25 1 pospelov
!time_profiling2.png!
26 1 pospelov
27 1 pospelov
28 1 pospelov
* InterferenceFunctionStrategy::calculateFormFactorList
29 1 pospelov
> 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.
30 1 pospelov
> setLambdaAlphaPhi - 4%. It can be backed up too I guess.
31 1 pospelov
> Again SimulationElement::getAlpha() - 1.2%
32 1 pospelov
33 1 pospelov
!time_profiling3.png!
34 1 pospelov
35 1 pospelov
36 1 pospelov
* FormFactorDWBA::evaluate
37 1 pospelov
> complex multiplication takes 1% of time
38 1 pospelov
39 1 pospelov
!time_profiling4.png!
40 1 pospelov
41 1 pospelov
42 1 pospelov
* FormFactorDWBA::evaluate_for_q
43 1 pospelov
> Just lots of numeric, no conclusion
44 1 pospelov
45 1 pospelov
!time_profiling5.png!
46 1 pospelov
47 1 pospelov
48 1 pospelov
* Going back in the tree to ScalarSpecularInfoMap::getOutCoefficients.
49 1 pospelov
> In takes 15% of whole performance, in the case of multi layers with lots of layers it will be even more.
50 1 pospelov
> 1% for new operator. Can we employ something like memory pool with "placement new" for it?
51 1 pospelov
52 1 pospelov
!time_profiling6.png!
53 1 pospelov
54 1 pospelov
* SpecularMatrix::execute()
55 1 pospelov
> Hard to say, may be MultiLayerCoeff_t.resize() - 2.4% - can be somehow improved?
56 1 pospelov
57 1 pospelov
!time_profiling7.png!