Currently, we have
Using Static.jl, the elements of Ones could be static(1) or static(1.0), which would propagate the fact that the number is static deeper into calculations and could enable better compiler optimizations.
Static.jl is a comparatively lightweight dependency on top of FillArrays, load-time impact would probably be minor:
julia> @time using FillArrays
0.398913 seconds (764.83 k allocations: 46.937 MiB, 72.11% compilation time)
julia> @time using Static
0.062017 seconds (93.65 k allocations: 5.420 MiB)