]> Cypherpunks repositories - gostls13.git/commit
net: append ":53" to DNS servers when reading resolv.conf
authorMatthew Dempsky <mdempsky@google.com>
Thu, 28 Apr 2016 18:15:44 +0000 (11:15 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 28 Apr 2016 20:22:11 +0000 (20:22 +0000)
commit4d9bda51ff91f79944a12106b77315c9414b851a
treed8cdfcc79c7f7a11f1657965b105b9736ca387ae
parent2cc27a7de9e7d14cb6702153688d02746c6a49ea
net: append ":53" to DNS servers when reading resolv.conf

Avoids generating some redundant garbage from re-concatenating the
same string for every DNS query.

benchmark                                      old allocs     new allocs     delta
BenchmarkGoLookupIP-32                         156            154            -1.28%
BenchmarkGoLookupIPNoSuchHost-32               456            446            -2.19%
BenchmarkGoLookupIPWithBrokenNameServer-32     577            564            -2.25%

benchmark                                      old bytes     new bytes     delta
BenchmarkGoLookupIP-32                         10873         10824         -0.45%
BenchmarkGoLookupIPNoSuchHost-32               43303         43140         -0.38%
BenchmarkGoLookupIPWithBrokenNameServer-32     46824         46616         -0.44%

Update #15473.

Change-Id: I3b0173dfedf31bd08eaea1069968b416850864a1
Reviewed-on: https://go-review.googlesource.com/22556
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/dnsclient_unix.go
src/net/dnsclient_unix_test.go
src/net/dnsconfig_unix.go
src/net/dnsconfig_unix_test.go