diff options
| author | 2025-11-05 21:58:38 +0100 | |
|---|---|---|
| committer | 2025-11-17 14:12:41 +0100 | |
| commit | d0c551acb5ab79efafd325f5b19c76a3de835356 (patch) | |
| tree | ba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/minio/crc64nvme/crc64.go | |
| parent | [performance] when transforming media, perform read operations of large files... (diff) | |
| download | gotosocial-d0c551acb5ab79efafd325f5b19c76a3de835356.tar.xz | |
[chore] update dependencies (#4542)
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97
- github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0
- github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6
- codeberg.org/gruf/go-mmap: fixes build for BSD platforms
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/minio/crc64nvme/crc64.go')
| -rw-r--r-- | vendor/github.com/minio/crc64nvme/crc64.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/minio/crc64nvme/crc64.go b/vendor/github.com/minio/crc64nvme/crc64.go index 40ac28c76..ca34a48e0 100644 --- a/vendor/github.com/minio/crc64nvme/crc64.go +++ b/vendor/github.com/minio/crc64nvme/crc64.go @@ -125,14 +125,19 @@ func update(crc uint64, p []byte) uint64 { p = p[align:] } runs := len(p) / 128 - crc = updateAsm(crc, p[:128*runs]) + if hasAsm512 && runs >= 8 { + // Use 512-bit wide instructions for >= 1KB. + crc = updateAsm512(crc, p[:128*runs]) + } else { + crc = updateAsm(crc, p[:128*runs]) + } return update(crc, p[128*runs:]) } buildSlicing8TablesOnce() crc = ^crc // table comparison is somewhat expensive, so avoid it for small sizes - for len(p) >= 64 { + if len(p) >= 64 { var helperTable = slicing8TableNVME // Update using slicing-by-8 for len(p) > 8 { |
