What is the most efficiency way to read the 3D matrix?

Julia standard library’s Serialization takes 2 ms to write, less than 0.5 ms to read and fills 1.7 MB on disk, on my small Win11 laptop, but not sure if the experts would recommend it:

using Serialization
TD = rand(150,27,55)
serialize("TD_serialize.bin", TD);     # 2.0 ms (24 allocs: 1.8 KiB)
TD2 = deserialize("TD_serialize.bin")  # 463 μs (31 allocs: 1.7 MiB)
TD == TD2   # true
3 Likes