News for hackers. Stuff that matters.
Re:Swapping two Numbers without Temporary Variables by baseballdork on Thursday March 24, 2022 @03:53PM (#30794598)
Indeed, both the algorithm in the article, the rust suggestion, and even the naive solution compile to the same instructions[1].

[1] - https://godbolt.org/z/1P98ss37P

Re:Swapping two Numbers without Temporary Variables by abainbridge on Thursday March 24, 2022 @04:32PM (#30795008)
That uses 4 registers and a stack!
Re:Swapping two Numbers without Temporary Variables by Thiez on Thursday March 24, 2022 @06:28PM (#30796185)
You can't do better with a non-inlined function.