]> Cypherpunks repositories - gostls13.git/commit
net: avoid allocation in setAddr
authorDave Cheney <dave@cheney.net>
Fri, 26 Oct 2012 08:41:21 +0000 (19:41 +1100)
committerDave Cheney <dave@cheney.net>
Fri, 26 Oct 2012 08:41:21 +0000 (19:41 +1100)
commit067315c647a8c973147bb53fb7a3483e99aa863e
tree2a16091e9d5dad33765dc58c2a3e523e4dd7c389
parent542dd8b9fba40e03ccdf1fac0a805b5b23ea3b8c
net: avoid allocation in setAddr

setAddr was showing up in profiles due to string concatenation construction the os.File name field. netFD.sysfile's Name() is never used, except in dup() so I believe it is safe to avoid this allocation.

R=mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/6742058
src/pkg/net/fd_unix.go