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
..
2022-03-18 15:19:26 -07:00
2022-08-02 10:08:05 -07:00
2022-08-04 11:52:16 -07:00
2022-03-16 14:53:59 -07:00
2021-08-05 15:54:00 -07:00
2022-08-02 10:08:05 -07:00
2022-08-06 09:30:10 -07:00
2021-08-05 15:54:00 -07:00
2021-08-05 15:54:00 -07:00
2021-08-05 15:54:00 -07:00
2022-08-10 15:49:36 -07:00
2022-08-02 10:08:05 -07:00
2022-08-02 10:08:05 -07:00
2022-03-17 11:35:09 -07:00