mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
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: a3182830e2
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>