Re:Swapping two Numbers without Temporary Variables
by pjscott on Thursday March 24, 2022 @03:54PM
(#30794614)
In most cases swapping two variables with a temporary variable will be either zero-overhead -- because you've just changed the names you're referring to those variables by, and the compiler knows it -- or very, very low-overhead. You're not actually saving any memory with the fancy tricks.
[ Parent
| on HN ]
There are no comments on this comment yet.