I want to create a vector of structs. In my code I do something like this
some_vector = Vector{SomeStruct}(big_number)
for i in 1:big_number
some_vector[i] = SomeStruct(some_args)
end
I believe this is allocating a small amount of memory many times. Once for each struct, and once for the vector. The vector just contains pointers to the structs.
Can I allocate an array of structs which is just one huge block of memory? If so, would that actually be more efficient?