mirror of https://github.com/tailscale/tailscale/
types/wgkey: simplify Key.UnmarshalJSON
Instead of calling ParseHex, do the hex.Decode directly. name old time/op new time/op delta UnmarshalJSON-8 86.9ns ± 0% 42.6ns ± 0% -50.94% (p=0.000 n=15+14) name old alloc/op new alloc/op delta UnmarshalJSON-8 128B ± 0% 0B -100.00% (p=0.000 n=15+15) name old allocs/op new allocs/op delta UnmarshalJSON-8 2.00 ± 0% 0.00 -100.00% (p=0.000 n=15+15) Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>pull/1874/head
parent
a0dacba877
commit
05bed64772
Loading…
Reference in New Issue