internal/deephash: fix accidental naked return

name              old time/op    new time/op    delta
Hash-8              23.0µs ± 1%    22.4µs ± 0%   -2.43%  (p=0.008 n=5+5)
HashMapAcyclic-8    24.0µs ± 0%    23.8µs ± 0%   -0.56%  (p=0.008 n=5+5)

name              old alloc/op   new alloc/op   delta
Hash-8              2.92kB ± 0%    2.49kB ± 0%  -14.80%  (p=0.000 n=5+4)
HashMapAcyclic-8    2.53kB ± 0%    2.53kB ± 0%     ~     (all equal)

name              old allocs/op  new allocs/op  delta
Hash-8                93.0 ± 0%      86.0 ± 0%   -7.53%  (p=0.008 n=5+5)
HashMapAcyclic-8       202 ± 0%       202 ± 0%     ~     (all equal)

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder 2021-05-18 08:52:10 -07:00 committed by Josh Bleecher Snyder
parent 79b7fa9ac3
commit bbb79f2d6a

View File

@ -114,7 +114,7 @@ func print(w *bufio.Writer, v reflect.Value, visited map[uintptr]bool) (acyclic
x := v.Interface().(tailcfg.DiscoKey) x := v.Interface().(tailcfg.DiscoKey)
w.Write(x[:]) w.Write(x[:])
} }
return return true
} }
} }