I work with “small” vectors, like 3 elements or 60 elements. And they do not pile up, I just update and transform them. Then - mostly - MVectors are very fast (like 10 times faster than normal vectors). Sometimes - when transforming vectors - I still need to use SVectors to avoid allocations. Example:
# extract the data for the winch simulation
length, v_reel_out = y[end-1], y[end]
lengthd, v_reel_outd = yd[end-1], yd[end]
# extract the data of the particles
y_ = @view y[1:end-2]
yd_ = @view yd[1:end-2]
# unpack the vectors y and yd
part = reshape(SVector{T}(y_), Size(3, div(T,6), 2))
partd = reshape(SVector{T}(yd_), Size(3, div(T,6), 2))
pos1, vel1 = part[:,:,1], part[:,:,2]
pos = SVector{div(T,6)+1}(if i==1 SVector(0.0,0,0) else SVector(pos1[:,i-1]) end for i in 1:div(T,6)+1)
vel = SVector{div(T,6)+1}(if i==1 SVector(0.0,0,0) else SVector(vel1[:,i-1]) end for i in 1:div(T,6)+1)
posd1, veld1 = partd[:,:,1], partd[:,:,2]
posd = SVector{div(T,6)+1}(if i==1 SVector(0.0,0,0) else SVector(posd1[:,i-1]) end for i in 1:div(T,6)+1)
veld = SVector{div(T,6)+1}(if i==1 SVector(0.0,0,0) else SVector(veld1[:,i-1]) end for i in 1:div(T,6)+1)