aboutsummaryrefslogtreecommitdiff
path: root/request
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-05-08 18:36:29 +0100
committerGravatar GitHub <noreply@github.com> 2018-05-08 18:36:29 +0100
commit68b45f5377ff0c8661f987398e316f3acae4835d (patch)
treeea744740986e9faefe660ba7500276ec8f348d61 /request
parent565e4164071778d076a48ece1698a0cf66e7548b (diff)
downloadcoredns-68b45f5377ff0c8661f987398e316f3acae4835d.tar.gz
coredns-68b45f5377ff0c8661f987398e316f3acae4835d.tar.zst
coredns-68b45f5377ff0c8661f987398e316f3acae4835d.zip
plugin/cache: unroll minTTL loop (#1773)
This allocates memory because of the append, just unroll the loop. Also add benchmark. Before: goos: linux goarch: amd64 pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-4 100000 11910 ns/op BenchmarkMinMsgTTL-4 1000000 1494 ns/op PASS After: goos: linux goarch: amd64 pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-4 100000 12016 ns/op BenchmarkMinMsgTTL-4 2000000 668 ns/op PASS
Diffstat (limited to 'request')
0 files changed, 0 insertions, 0 deletions