Use Minio's optimized SHA-256

internal/repository benchmarks on an Intel i7-3770k:

name               old speed      new speed       delta
PackerManager-8     209MB/s ± 1%    291MB/s ± 1%  +38.94%  (p=0.008 n=5+5)
SaveAndEncrypt-8    112MB/s ± 1%    135MB/s ± 1%  +20.25%  (p=0.008 n=5+5)
This commit is contained in:
greatroar
2020-04-28 07:57:18 +02:00
parent 070d43e290
commit 42a3db05b0
5 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -2,13 +2,14 @@ package restic
import (
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"github.com/restic/restic/internal/errors"
"github.com/minio/sha256-simd"
)
// Hash returns the ID for data.