Find the smallest, this takes 2 comparisons, and swap it into the first position.
Then compare the remaining 2 and swap if necessary.
if (x < y) {
if (z < x) swap(x,z);
} else {
if (y < z) swap(x,y);
else swap(x,z);
}
if(z
This takes 3 comparisons, but only two swaps.