Static array Julia for Optim.jl


I am using Optim.jl for the nonlinear optimization of a set of coefficients (dim <30). Can I expect some speed-up if I use StaticArrays to compute the gradients, store the coefficients?

How expensive is your objective function?

The objective function is pretty expensive because it involves the integration of a vector valued function \mathbb{R} \xrightarrow{} \mathbb{R}^{10000} (I am using quadGK with reltol = 1e-3 to get some speed-up). For 30 coefficients, getting the cost and its gradient takes 2ms.

In that case, the vector type that you pass to Optim, or any of the calculations in Optim, will be irrelevant to performance.