Find the parameters that maximize the performance of a function