Suppose I write a function that operates over (simple) arrays, even just taking floats as an input to construct the array, can Julia optimize the whole thing into a simple expression?
function f(a::Float64,b::Float64) [a b] * [a+1; b+1] end
function g(a::Float64, b::Float64) a * (a+1) + b * (b+1) end
This gist shows an example
Would it be necessary perhaps for me to use a more specialized matrix computation compiler library, for instance, or is this something we might see the Julia compiler do someday? Or is this something that might happen only in the JIT level, perhaps?