avoid an alloc in sha-512 benchmarks

master
magical 2024-10-05 19:50:43 -07:00
parent 0de798ef8f
commit d6e555a97c
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func TestHash(t *testing.T) {
} }
func benchmark(b *testing.B, f func() hash.Hash, size int64) { func benchmark(b *testing.B, f func() hash.Hash, size int64) {
var tmp [Size]byte var tmp [Size * 2]byte
var msg [8192]byte var msg [8192]byte
b.SetBytes(size) b.SetBytes(size)
h := f() h := f()