4 ms·
Alternatively you can do: a ^= b; b ^= a; a ^= b; Which uses less energy because the bitwise operators do not use the intermediate/interbit carry.
by pickledcods 5y ago
Alternatively you can do:
a ^= b;
b ^= a;
a ^= b;
Which uses less energy because the bitwise operators do not use the intermediate/interbit carry.