I have a remote machine that is often on the same local network as the machine I'm using and that I can refer to using either a domain name or a local IP address. Does how I refer to it affect latency or throughput?
For example, when I want to ssh to this machine, lately I've been using a shell script which first checks if I'm on the same local network and if so it uses the local IP address and if not it uses the domain name. Does this script in any way speed up the connection when both machines are on the same local network?