commit | efb8d7ab942d2b798abae11dfebfb9043cac78be | [log] [tgz] |
---|---|---|
author | Mateusz Poliwczak <mpoliwczak34@gmail.com> | Sat Aug 26 16:55:17 2023 +0000 |
committer | Gopher Robot <gobot@golang.org> | Mon Aug 28 16:23:47 2023 +0000 |
tree | ed62f5f36e50102c5b2d2791537daf3381893097 | |
parent | d8d84787ad6422cae430ca5e2455b1e0abf99225 [diff] |
dns/dnsmessage: don't include bytes after name.Length in the compression map This improves the performance of name compression and makes the name.Data[name.Length:] not included in the compression map, it is unnecessary and might cause issues (i.e. reusing the Name struct, without using the NewName function). goos: linux goarch: amd64 pkg: golang.org/x/net/dns/dnsmessage cpu: Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz │ before │ after │ │ sec/op │ sec/op vs base │ Pack-4 15.672µ ± 13% 5.470µ ± 14% -65.10% (p=0.000 n=10) AppendPack-4 15.144µ ± 12% 5.330µ ± 10% -64.80% (p=0.000 n=10) geomean 15.41µ 5.400µ -64.95% │ before │ after │ │ B/op │ B/op vs base │ Pack-4 6.051Ki ± 0% 1.285Ki ± 0% -78.76% (p=0.000 n=10) AppendPack-4 5684.0 ± 0% 804.0 ± 0% -85.86% (p=0.000 n=10) geomean 5.795Ki 1.005Ki -82.67% │ before │ after │ │ allocs/op │ allocs/op vs base │ Pack-4 21.00 ± 0% 11.00 ± 0% -47.62% (p=0.000 n=10) AppendPack-4 20.00 ± 0% 10.00 ± 0% -50.00% (p=0.000 n=10) geomean 20.49 10.49 -48.82% Change-Id: Idf40d5d4790d37eb7253214f089eff859a937c60 GitHub-Last-Rev: a3182830e27086a0e12e116c7f7916468eb1edf2 GitHub-Pull-Request: golang/net#190 Reviewed-on: https://go-review.googlesource.com/c/net/+/522817 Run-TryBot: Mateusz Poliwczak <mpoliwczak34@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This repository holds supplementary Go networking libraries.
The easiest way to install is to run go get -u golang.org/x/net
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/net
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the net repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.