Precalculate exp(x) for whole fResiduals vector.
Precalculate exp(x) for whole fResiduals vector.

Performance analysis has shown that most CPU time for BDT calculation
is spent in the exp(x) function.

In particular, for a vector<Double_t> of size nClasses for every i,j the
following is calculated: exp(fResiduals[*e].at(j)-fResiduals[*e].at(i)),
i.e. in total there are O(nClasses**2) exp calculations. This can be
replaced by precalculting O(nClasses) exp values and further using division.

While this gives identical results in symbolic calculations, the results
in numeric calculations using Double_t's might differ.

Signed-off-by: Danilo Piparo <866ed6f288e41d68fafde22d35ed1a04986fa45f@cern.ch>

gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root,gganis/root