tailscale/util
Joe Tsai 76b0e578c5
util/sha256x: new package (#5337)
The hash.Hash provided by sha256.New is much more efficient
if we always provide it with data a multiple of the block size.
This avoids double-copying of data into the internal block
of sha256.digest.x. Effectively, we are managing a block ourselves
to ensure we only ever call hash.Hash.Write with full blocks.

Performance:

	name    old time/op    new time/op    delta
	Hash    33.5µs ± 1%    20.6µs ± 1%  -38.40%  (p=0.000 n=10+9)

The logic has gone through CPU-hours of fuzzing.

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2022-08-10 15:49:36 -07:00
..
cibuild all: use cibuild.On 2022-03-18 15:19:26 -07:00
clientmetric all: gofmt for Go 1.19 2022-08-02 10:08:05 -07:00
cloudenv all: use syncs.AtomicValue 2022-08-04 11:52:16 -07:00
cmpver util/cmpver: move into OSS from corp repo. 2021-04-23 20:55:45 -07:00
codegen all: convert more code to use net/netip directly 2022-07-25 21:53:49 -07:00
deephash util/deephash: always keep values addressable (#5328) 2022-08-09 22:00:02 -07:00
dnsname all: use Go 1.18's strings.Cut 2022-03-16 14:53:59 -07:00
endian all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
groupmember util/groupmember: remove redundant code (#4298) 2022-03-26 21:45:06 -07:00
jsonutil all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
lineread util/lineread: add docs to Reader 2020-11-19 12:14:58 -08:00
mak util/mak: move tailssh's mapSet into a new package for reuse elsewhere 2022-04-21 21:20:10 -07:00
multierr all: gofmt for Go 1.19 2022-08-02 10:08:05 -07:00
must util/must: rename Do->Get, add Do 2022-08-06 09:30:10 -07:00
osshare all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
pidowner all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
precompress cmd/tsconnect,util/precompress: move precompression to its own package 2022-08-03 17:44:57 -07:00
racebuild all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
sha256x util/sha256x: new package (#5337) 2022-08-10 15:49:36 -07:00
singleflight all: gofmt for Go 1.19 2022-08-02 10:08:05 -07:00
strs util/strs: add new package for string utility funcs 2022-08-05 15:06:08 -07:00
systemd all: gofmt for Go 1.19 2022-08-02 10:08:05 -07:00
uniq all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
winutil net/dns, paths, util/winutil: change net/dns/windowsManager NRPT management to support more than 50 domains. 2022-05-27 14:56:09 -06:00