]> Cypherpunks repositories - gostls13.git/commit
net: reduce number of memory allocations during IO operations
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 6 Aug 2013 10:40:10 +0000 (14:40 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 6 Aug 2013 10:40:10 +0000 (14:40 +0400)
commit04b1cfa94635f18462b8a076cebacc5e08d92631
treef1ec37172bfb020b79068f35ef028ac4a62d39a7
parent9c0500b466196388ab40e03c94759066bb1c7fe6
net: reduce number of memory allocations during IO operations
Embed all data necessary for read/write operations directly into netFD.

benchmark                    old ns/op    new ns/op    delta
BenchmarkTCP4Persistent          27669        23341  -15.64%
BenchmarkTCP4Persistent-2        18173        12558  -30.90%
BenchmarkTCP4Persistent-4        10390         7319  -29.56%

This change will intentionally break all builders to see
how many allocations they do per read/write.
This will be fixed soon afterwards.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/12413043
src/pkg/net/fd_windows.go
src/pkg/net/sendfile_windows.go
src/pkg/net/tcp_test.go
src/pkg/runtime/netpoll_windows.c