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
Joe Tsai 548fa63e49
util/deephash: use binary encoding of time.Time (#5352)
Formatting a time.Time as RFC3339 is slow.
See https://go.dev/issue/54093

Now that we have efficient hashing of fixed-width integers,
just hash the time.Time as a binary value.

Performance:

	Hash-24                19.0µs ± 1%    18.6µs ± 1%   -2.03%  (p=0.000 n=10+9)
	TailcfgNode-24         1.79µs ± 1%    1.40µs ± 1%  -21.74%  (p=0.000 n=10+9)

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2 years ago
..
cibuild all: use cibuild.On 3 years ago
clientmetric all: gofmt for Go 1.19 2 years ago
cloudenv all: use syncs.AtomicValue 2 years ago
cmpver util/cmpver: move into OSS from corp repo. 3 years ago
codegen all: convert more code to use net/netip directly 2 years ago
deephash util/deephash: use binary encoding of time.Time (#5352) 2 years ago
dnsname all: use Go 1.18's strings.Cut 3 years ago
endian all: gofmt with Go 1.17 3 years ago
groupmember util/groupmember: remove redundant code (#4298) 3 years ago
jsonutil all: use any instead of interface{} 3 years ago
lineread util/lineread: add docs to Reader 4 years ago
mak util/mak: move tailssh's mapSet into a new package for reuse elsewhere 2 years ago
multierr all: gofmt for Go 1.19 2 years ago
must util/must: rename Do->Get, add Do 2 years ago
osshare all: gofmt with Go 1.17 3 years ago
pidowner all: gofmt with Go 1.17 3 years ago
precompress cmd/tsconnect,util/precompress: move precompression to its own package 2 years ago
racebuild all: gofmt with Go 1.17 3 years ago
sha256x util/deephash: use sha256x (#5339) 2 years ago
singleflight all: gofmt for Go 1.19 2 years ago
strs util/strs: add new package for string utility funcs 2 years ago
systemd all: gofmt for Go 1.19 2 years ago
uniq all: use any instead of interface{} 3 years ago
winutil net/dns, paths, util/winutil: change net/dns/windowsManager NRPT management to support more than 50 domains. 2 years ago