mirror of
https://github.com/minio/minio.git
synced 2025-03-31 01:33:41 -04:00
Update S2 compression (#11753)
Relevant updates: * Less allocations on decode: https://github.com/klauspost/compress/pull/322 * Fixed rare out-of-bounds write on amd64. * ARM64 decompression assembly. Around 2x output speed. https://github.com/klauspost/compress/pull/324 * Speed up decompression on non-assembly platforms. https://github.com/klauspost/compress/pull/328 Upgrade cpuid to match simdjson.
This commit is contained in:
parent
777344a594
commit
952b0f111d
4
go.mod
4
go.mod
@ -33,8 +33,8 @@ require (
|
|||||||
github.com/hashicorp/vault/api v1.0.4
|
github.com/hashicorp/vault/api v1.0.4
|
||||||
github.com/jcmturner/gokrb5/v8 v8.4.2
|
github.com/jcmturner/gokrb5/v8 v8.4.2
|
||||||
github.com/json-iterator/go v1.1.10
|
github.com/json-iterator/go v1.1.10
|
||||||
github.com/klauspost/compress v1.11.7
|
github.com/klauspost/compress v1.11.12
|
||||||
github.com/klauspost/cpuid v1.3.1
|
github.com/klauspost/cpuid/v2 v2.0.4
|
||||||
github.com/klauspost/pgzip v1.2.5
|
github.com/klauspost/pgzip v1.2.5
|
||||||
github.com/klauspost/readahead v1.3.1
|
github.com/klauspost/readahead v1.3.1
|
||||||
github.com/klauspost/reedsolomon v1.9.11
|
github.com/klauspost/reedsolomon v1.9.11
|
||||||
|
2
go.sum
2
go.sum
@ -333,6 +333,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
|
|||||||
github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
|
github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
|
||||||
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
|
github.com/klauspost/compress v1.11.12 h1:famVnQVu7QwryBN4jNseQdUKES71ZAOnB6UQQJPZvqk=
|
||||||
|
github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||||
github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s=
|
github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s=
|
||||||
github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=
|
github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=
|
||||||
|
@ -22,14 +22,13 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/klauspost/cpuid"
|
"github.com/klauspost/cpuid/v2"
|
||||||
"github.com/minio/minio-go/v7"
|
"github.com/minio/minio-go/v7"
|
||||||
"github.com/minio/simdjson-go"
|
"github.com/minio/simdjson-go"
|
||||||
)
|
)
|
||||||
@ -363,11 +362,13 @@ func TestJSONQueries(t *testing.T) {
|
|||||||
t.Run(testCase.name, func(t *testing.T) {
|
t.Run(testCase.name, func(t *testing.T) {
|
||||||
// Hack cpuid to the CPU doesn't appear to support AVX2.
|
// Hack cpuid to the CPU doesn't appear to support AVX2.
|
||||||
// Restore whatever happens.
|
// Restore whatever happens.
|
||||||
defer func(f cpuid.Flags) {
|
if cpuid.CPU.Supports(cpuid.AVX2) {
|
||||||
cpuid.CPU.Features = f
|
cpuid.CPU.Disable(cpuid.AVX2)
|
||||||
}(cpuid.CPU.Features)
|
defer cpuid.CPU.Enable(cpuid.AVX2)
|
||||||
cpuid.CPU.Features &= math.MaxUint64 - cpuid.AVX2
|
}
|
||||||
|
if simdjson.SupportedCPU() {
|
||||||
|
t.Fatal("setup error: expected cpu to be unsupported")
|
||||||
|
}
|
||||||
testReq := testCase.requestXML
|
testReq := testCase.requestXML
|
||||||
if len(testReq) == 0 {
|
if len(testReq) == 0 {
|
||||||
var escaped bytes.Buffer
|
var escaped bytes.Buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user