When they are on the same host connected to the same virtual switch the network traffic remains internal to the host and performance is improved. While on different hosts the traffice will traverse the physical network and be exposed to the issues of an IP network including contention.
If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful