Fix profiling code, use most accurate initial step size
400% faster calc_mu, don't recalc gradient unnecessarily