• Mikio Hara's avatar
    go.net/ipv4: simplify ancillary helpers · ecb7ecda
    Mikio Hara authored
    This CL reduces unnecessary allocations in ancillary helper
    functions. Also clarifies documentation on ControlMessage,
    ControlFlags.
    
    benchmark                     old allocs   new allocs    delta
    BenchmarkReadWriteNetUDP-2             6            6    0.00%
    BenchmarkReadWriteIPv4UDP-2           17           15  -11.76%
    
    R=dave
    CC=golang-dev
    https://golang.org/cl/9232050
    ecb7ecda
control.go 1.64 KB