These aren't algorithms. The language is still doing something under the hood to do the swap.
And then the cpu is doing something under the hood to do whatever the assembly code thought it said.
Express your actual intent, if your chosen language has a "swap" intrinsic, use it, if not write the swap in a natural and idiomatic way, and let other people do the lifting.