I think I mentioned it a long time ago (although I am not sure), but perhaps now it could be fixed.
It seems that GSLMultiFit during the gradient calculation procedure before starting first iteration of the fit, calculates gradient for all values - even those fixed. No such thing happens for Minuit. I think this could mean a large efficiency loss when performing many small, quick separate fits for functions with lot’s of fixed parameters.
Seems that the problem exists only with fitting via ROOT::Math etc. interfaces, not via TH::Fit(). I modified the script for the simulatnous fitting of two functions. It displays the changes of the fixed parameter before the first fit iteration. combinedFit2.C (5.69 KB)
Is this example in general is easily changeable to a 2D case? I thought yes, but it still counts gradient for me in the 2D case after modification. Perhaps a bug in my copy&paste or perhaps something more general.
To change it into a 2D case, I simply changed the wrapper functions to 2D:
Found a bug in my copy& paste. Seems that this change not only skips unnecessary gradient calculations at the beginning, but also some calculations during normal iterations - normal iterations are now, I guess, a few dozen times faster