I have been writing some code in the style of:
a1 = b1;
a2 = b2;
a3 = b3;
...
an = bn;
Suddenly I realize that for me, and for the context that I am writing the current algorithm (...) is more aesthetically pleasing to write some of these assignments in the form of:
(a1, a2, a3, ..., an) = (b1, b2, b3, ..., bn);
Now, I would like to know about the impact that this way of writing code can have on the performance. I suppose that here the construction-deconstruction of tuples can be optimized away by the compiler. But maybe not? Note that b1, b2, ..., bn can be values or expressions. And also if the optimization cannot be done, the size of n will matter (I think).
So, to have a concrete question: Can someone explain the difference in performance about the 2 ways of writing code, taking into account all the possible details?
Thanks in advance.