Hi dev...share your observations?
x = x^y;
y = x^y;
x = x^y;
Or
temp = x;
x = y;
y = temp;
Which one is better?
Hi dev...share your observations?
x = x^y;
y = x^y;
x = x^y;
Or
temp = x;
x = y;
y = temp;
Which one is better?
For further actions, you may consider blocking this person and/or reporting abuse
Adam Świderski -
taijidude -
taijidude -
Davide Santangelo -
Top comments (1)
The second is computationally faster, and it is clearer to read, clearly showing developer intent. It also works on non-integer data types, too.
More details: dev.to/comments/684523