Hello, this this question is out of curiosity, hoping to understand more about Julia.

Those three functions allocate differently:

```
g1(v::Vector{Int64}) = SVector{length(v), Int64}(v...)
g2(v::Vector{Int64}, n) = SVector{n, Int64}((v[i] for i=1:n)...)
g3(v::Vector{Int64}) = SVector{length(v), Int64}((v[i] for i=1:length(v))...)
```

```
julia> @benchmark g1($v) evals=1 samples=1
BenchmarkTools.Trial:
memory estimate: 640 bytes
allocs estimate: 11
julia> @benchmark g2($v, 2) evals=1 samples=1
BenchmarkTools.Trial:
memory estimate: 0 bytes
allocs estimate: 0
julia> @benchmark g3($v) evals=1 samples=1
BenchmarkTools.Trial:
memory estimate: 736 bytes
allocs estimate: 14
```

Could someone guide me towards understanding this precisely? Thanks!