Syscalls are expensive, and writing data over loopback is very fast, so this is essentially just timing how fast you can make 1 million calls to
Making lots of small reads and writes is the primary use case for using buffered io. Wrapping the normal
net.TCPConn in a
bufio.Writer will provide the expected performance increase.