Small #JuliaLang tip: if you want to write several vectors to the same file, assuming that the dimensions coincide, you can do this just with
open("path", "w") do io
writedlm(io, [x y z])
end
**But! The command [x y z] generates a matrix, thus allocating a lot of memory**. Luckily, writedlm also accepts zip(x,y,z), which does the same and is orders of magnitude faster, since it does not allocate memory! #julia
@vbuendiar Have you tried using the JLD package instead? It's quite convenient as it can export any object or set of objects as a dict and you can easily re-load them into their original variable names. https://docs.juliahub.com/JLD2/O1EyT/0.4.0/
@vbuendiar True, but as one who prefers maximum code reusability, I much prefer a "one and done" solution unless I'm working with TONS of data, but I'm just lazy 😂
@johnabs Hahahaha, everything has its own use. Small stupid tests that the JLD2 through FileIO are slower than writedlm for my use case.
But sure it is an amazing way to store serialized data, I never liked to work with HDF5 because it felt weird in Python, but I will definitely give a chance to this for other applications. Thx!!