mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05: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:
@@ -22,14 +22,13 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"net/http"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/klauspost/cpuid"
|
||||
"github.com/klauspost/cpuid/v2"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/simdjson-go"
|
||||
)
|
||||
@@ -363,11 +362,13 @@ func TestJSONQueries(t *testing.T) {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
// Hack cpuid to the CPU doesn't appear to support AVX2.
|
||||
// Restore whatever happens.
|
||||
defer func(f cpuid.Flags) {
|
||||
cpuid.CPU.Features = f
|
||||
}(cpuid.CPU.Features)
|
||||
cpuid.CPU.Features &= math.MaxUint64 - cpuid.AVX2
|
||||
|
||||
if cpuid.CPU.Supports(cpuid.AVX2) {
|
||||
cpuid.CPU.Disable(cpuid.AVX2)
|
||||
defer cpuid.CPU.Enable(cpuid.AVX2)
|
||||
}
|
||||
if simdjson.SupportedCPU() {
|
||||
t.Fatal("setup error: expected cpu to be unsupported")
|
||||
}
|
||||
testReq := testCase.requestXML
|
||||
if len(testReq) == 0 {
|
||||
var escaped bytes.Buffer
|
||||
|
||||
Reference in New Issue
Block a user