You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
2 years ago
..
testtype util/deephash: fix unexported time.Time hashing 2 years ago
debug.go util/deephash: add debug printer (#5460) 2 years ago
deephash.go util/deephash: require pointer in API (#5467) 2 years ago
deephash_test.go util/deephash: require pointer in API (#5467) 2 years ago
pointer.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2 years ago
pointer_norace.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2 years ago
pointer_race.go util/deephash: use unsafe.Pointer instead of reflect.Value (#5459) 2 years ago
types.go util/deephash: specialize for netip.Addr and drop AppendTo support (#5402) 2 years ago
types_test.go util/deephash: move typeIsRecursive and canMemHash to types.go (#5386) 2 years ago