root-project / rootbench

Collection of benchmarks and performance monitoring applications
GNU Lesser General Public License v2.1
20 stars 41 forks source link

Improve fitting benchmark using AD or numerical gradient #210

Closed lmoneta closed 3 years ago

lmoneta commented 3 years ago

Add new benchmark test for fitting using Gradient. Move out single gaus fit to a new test, FitGrafBenchmark and add a new test fitting an histogram with a polynomial and a variable number of gaussians. The number of gaussians and number of bins can be specified by doing:

./FitGradBenchmark -nfunc 10 -nbins 1000

Fix also existing test fitting a single gaussian.

vgvassilev commented 3 years ago

@lmoneta, could you include the suggested patch and perhaps remove the custom main function? After those changes I think we are good to go.

lmoneta commented 3 years ago

@vgvassilev I have included your suggested changes, but modify the range of parameters to increas by factor of 2, since it looks to me more significative. I think it is still good to keep the main function to add in case of issues a verbose capability. I don't see the harm of keeping it.

lmoneta commented 3 years ago

The timing result will show a much better values for Clad after applying https://github.com/root-project/root/pull/7001. This is because the PR reduces significantly the number of iterations when using AD.

vgvassilev commented 3 years ago

@lmoneta, sounds good!

The timing result will show a much better values for Clad after applying root-project/root#7001. This is because the PR reduces significantly the number of iterations when using AD.

Can you paste here the numbers if you have them?