一般就用localhost了!哪个快慢你可以测试下嘛!

解决方案 »

  1.   

    测试了一下,看来还是有区别的。建议还是写localhost吧[dev@www2 ~]$ traceroute xxx.xxx.xxx.xxx
    traceroute to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx), 30 hops max, 38 byte packets
     1  xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)  0.031 ms  0.031 ms  0.012 ms[dev@www2 ~]$ traceroute localhost
    traceroute to www2.mz16.cn (127.0.0.1), 30 hops max, 38 byte packets
     1  www2 (127.0.0.1)  0.030 ms  0.014 ms  0.012 ms
      

  2.   

    localhost
    127.0.0.1
    外网IP
      

  3.   

    严格地说 127.0.0.1 比 localhost 要快一些,localhost比127.0.0.1多一个本地解析步骤(打开hosts文件就可以看到)。
      

  4.   

    如果是linux,关掉网络用sock连更快
      

  5.   

    127.0.0.1有时候不能工作,建议还是localhost。