Also regarding Section 3.3, does anyone have an intuition for why the Julia implementation of kalmanNaive is much slower (6-7x) than a “comparable” Matlab implementation (which the paper does not show but that I imagine being almost identical to the Julia one, except for the obvious syntactic translations). I understand that the naive Julia version is leaving a lot of potential optimizations on the table, but I imagine that a comparable Matlab version would as well.
function kalmanNaive(x, P, y, yEst, R, H)
K = (P * H’) / (R + H * P * H’)
x = x + K * (y - yEst)
P = (I - K * H) * P
return x, P
end
It looks like a very simple function that essentially does only a few linear algebra operations, so I would expect this difference between the two languages to be applicable in many scenarios.