swapping elements benchmark