You’re just seeing benchmarking artifacts. You need to use $ to interpolate values when benchmarking, as discussed in more detail in the manual: Manual · BenchmarkTools.jl
julia> using StaticArrays, BenchmarkTools
julia> struct Foo{T <: Real}
x :: T; y :: T; z :: T
end
julia> f(foo :: Foo) = SA[foo.x, foo.y, foo.z]
f (generic function with 1 method)
julia> foo = Foo(1., 2., 3.)
Foo{Float64}(1.0, 2.0, 3.0)
julia> @btime f($foo)
1.449 ns (0 allocations: 0 bytes)
Furthermore, when you see a benchmark returning 0.010 ns (or really anything less than 1ns), then that just means the compiler was smart enough to optimize your entire code away. See Manual · BenchmarkTools.jl for more.