tailscale/util/deephash
Joe Tsai ab7e6f3f11
util/deephash: require pointer in API (#5467)
The entry logic of Hash has extra complexity to make sure
we always have an addressable value on hand.
If not, we heap allocate the input.
For this reason we document that there are performance benefits
to always providing a pointer.
Rather than documenting this, just enforce it through generics.

Also, delete the unused HasherForType function.
It's an interesting use of generics, but not well tested.
We can resurrect it from code history if there's a need for it.

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2022-08-27 16:08:31 -07:00
..
testtype util/deephash: fix unexported time.Time hashing 2022-07-27 09:28:23 -07:00
debug.go util/deephash: add debug printer (#5460) 2022-08-27 12:14:07 -07:00
deephash.go util/deephash: require pointer in API (#5467) 2022-08-27 16:08:31 -07:00
deephash_test.go util/deephash: require pointer in API (#5467) 2022-08-27 16:08:31 -07:00
pointer.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2022-08-27 12:30:35 -07:00
pointer_norace.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2022-08-27 12:30:35 -07:00
pointer_race.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2022-08-27 12:30:35 -07:00
types.go util/deephash: specialize for netip.Addr and drop AppendTo support (#5402) 2022-08-18 22:54:56 -07:00
types_test.go util/deephash: move typeIsRecursive and canMemHash to types.go (#5386) 2022-08-16 09:31:19 -07:00