• Matthew Dempsky's avatar
    net: append ":53" to DNS servers when reading resolv.conf · 4d9bda51
    Matthew Dempsky authored
    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/22556Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    4d9bda51
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...