tailscale/tailcfg
Josh Bleecher Snyder ceb568202b tailcfg: optimize keyMarshalText
This function accounted for ~1% of all allocs by tailscaled.
It is trivial to improve, so may as well.

name              old time/op    new time/op    delta
KeyMarshalText-8     197ns ± 0%      47ns ± 0%  -76.12%  (p=0.016 n=4+5)

name              old alloc/op   new alloc/op   delta
KeyMarshalText-8      200B ± 0%       80B ± 0%  -60.00%  (p=0.008 n=5+5)

name              old allocs/op  new allocs/op  delta
KeyMarshalText-8      5.00 ± 0%      1.00 ± 0%  -80.00%  (p=0.008 n=5+5)

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-05-07 18:50:10 -07:00
..
derpmap.go tailcfg, net/netcheck: let control mark "Avoid" bit on DERP regions 2021-03-12 10:43:24 -08:00
tailcfg.go tailcfg: optimize keyMarshalText 2021-05-07 18:50:10 -07:00
tailcfg_clone.go tailcfg: add FallbackResolvers to DNSConfig. 2021-04-20 12:49:48 -07:00
tailcfg_test.go tailcfg: optimize keyMarshalText 2021-05-07 18:50:10 -07:00