Have you timed segments to see where it is slow? Also, how long is “too long”. Try AbsoluteTiming, the first step in speeding up any code is to identify where it is slowest.
– Quantum_Oli
Feb 10 at 10:06

At DistributionFitTest and then at Plot. “too long” time is in hours I am using version 10 on i7 fourth edition
– SAAN
Feb 10 at 10:14

You probably should not run EmpiricalDistribution[data] inside the Plot, because it has to be evaluated for every x again. Also, you could try to reduce the number of computations in Plot via the Mesh option. Further, you should reduce your example to a shorter computation time and then try to optimize it.
– Berg
Feb 10 at 10:45

What do you want to do with ll[a_, b_, c_, p_] = LogLikelihood[f[a, b, c, p], data] /. pars ? It doesn’t make much sense to me.
– rhermans
Feb 10 at 11:11

I played around with your code a bit and sometimes I get an error that the algorithm FindDistributionParameters does not converge. Is this to be expected? Also those parameters vary wildly. Is this intended?
– Berg
Feb 10 at 11:12

=================

1 Answer
1

=================

OK, a partial answer without considering h[“TestDataTable”,All]: In the plot it is much faster to move the pars inside CDF. (Computing CDF numerically vs. symbolically, I guess.)