• Rémy Oudompheng's avatar
    net: remove unnecessary Close contention. · b18a7c7c
    Rémy Oudompheng authored
    Contention profile in BenchmarkTCPOneShot (Core 2 Quad):
    
    Before
    Total: 80.285 seconds
    44.743  55.7%  55.7%   44.743  55.7% runtime.chanrecv1
    31.995  39.9%  95.6%   31.995  39.9% sync.(*Mutex).Lock
     3.547   4.4% 100.0%    3.547   4.4% runtime.chansend1
    
    After
    Total: 48.341 seconds
    45.810  94.8%  94.8%   45.810  94.8% runtime.chanrecv1
     2.530   5.2% 100.0%    2.530   5.2% runtime.chansend1
     0.001   0.0% 100.0%    0.001   0.0% sync.(*Mutex).Lock
    
    R=golang-dev, dave, mikioh.mikioh
    CC=golang-dev
    https://golang.org/cl/6845119
    b18a7c7c
sock_posix.go 1.85 KB