tailscale/internal/deephash
Josh Bleecher Snyder 15a7ff83de internal/deephash: remove netaddr special cases
All netaddr types that we are concerned with now implement AppendTo.
Use the AppendTo method if available, and remove all references to netaddr.

This is slower but cleaner, and more readily re-usable by others.

name              old time/op    new time/op    delta
Hash-8              12.6µs ± 0%    14.8µs ± 1%  +18.05%  (p=0.000 n=8+10)
HashMapAcyclic-8    21.4µs ± 1%    21.9µs ± 1%   +2.39%  (p=0.000 n=10+9)

name              old alloc/op   new alloc/op   delta
Hash-8                408B ± 0%      408B ± 0%     ~     (p=1.000 n=10+10)
HashMapAcyclic-8     1.00B ± 0%     1.00B ± 0%     ~     (all equal)

name              old allocs/op  new allocs/op  delta
Hash-8                6.00 ± 0%      6.00 ± 0%     ~     (all equal)
HashMapAcyclic-8      0.00           0.00          ~     (all equal)

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-05-24 14:47:41 -07:00
..
deephash_test.go internal/deephash: add re-usable scratch space 2021-05-24 13:51:23 -07:00
deephash.go internal/deephash: remove netaddr special cases 2021-05-24 14:47:41 -07:00
fmtsort.go internal/deephash: rename from deepprint 2021-05-11 12:11:16 -07:00
mapiter_future.go internal/deephash: re-use MapIter 2021-05-24 14:47:41 -07:00
mapiter.go internal/deephash: re-use MapIter 2021-05-24 14:47:41 -07:00