Open
Description
@simonbyrne mentioned that under some circumstances with StaticArrays
:
function apply_slab()
out = MArray{}...
....
return SMatrix(out)
end
will not heap allocate the temporary intermediate array if the compiler can infer the lifetime of the mutable array pointer. It doesn't look like that optimization is currently always triggering and needs to be further investigated. In general we probably need to re-think slab allocation optimization under the new operator structure.