Type inference when just making a tuple

The main reason Tuples have better performance than Vectors is that the compiler knows their length, so they can be stored on the stack (not heap allocated). If your data has variable length, then Julia needs to compile a new function for every unique length. In this case, a vector is almost always the right choice.

2 Likes