Skip to content

Commit

Permalink
skip not use avx
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed Apr 8, 2024
1 parent 2f01194 commit ccd6d3c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
28 changes: 17 additions & 11 deletions internal/decoder/assembler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@
package decoder

import (
`encoding/base64`
`encoding/json`
`reflect`
`testing`
`unsafe`
"encoding/base64"
"encoding/json"
"reflect"
"runtime"
"testing"
"unsafe"

`github.com/bytedance/sonic/internal/caching`
`github.com/bytedance/sonic/internal/jit`
`github.com/bytedance/sonic/internal/native/types`
`github.com/bytedance/sonic/internal/rt`
`github.com/stretchr/testify/assert`
`github.com/stretchr/testify/require`
"github.com/bytedance/sonic/internal/caching"
"github.com/bytedance/sonic/internal/jit"
"github.com/bytedance/sonic/internal/native/types"
"github.com/bytedance/sonic/internal/rt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestAssembler_DecodeStruct_SinglePrivateField(t *testing.T) {
Expand All @@ -43,6 +44,11 @@ func TestAssembler_DecodeStruct_SinglePrivateField(t *testing.T) {
if len(s) != pos {
panic(pos)
}
pc, file, line, ok := runtime.Caller(0)
if !ok {
println(pc, file, line)
panic("runtime.Caller failed")
}
require.NoError(t, err)
// assert.Equal(t, len(s), pos)
// assert.Equal(t, Tx{}, v)
Expand Down
13 changes: 7 additions & 6 deletions internal/native/dispatch_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func useAVX() {

func useAVX2() {
avx2.Use()
sse.Use()
S_f64toa = avx2.S_f64toa
__F64toa = avx2.F_f64toa
S_f32toa = avx2.S_f32toa
Expand All @@ -251,12 +252,12 @@ func useAVX2() {
S_vnumber = avx2.S_vnumber
S_vsigned = avx2.S_vsigned
S_vunsigned = avx2.S_vunsigned
S_skip_one = avx2.S_skip_one
__SkipOne = avx2.F_skip_one
__SkipOneFast = avx2.F_skip_one_fast
S_skip_array = avx2.S_skip_array
S_skip_object = avx2.S_skip_object
S_skip_number = avx2.S_skip_number
S_skip_one = sse.S_skip_one
__SkipOne = sse.F_skip_one
__SkipOneFast = sse.F_skip_one_fast
S_skip_array = sse.S_skip_array
S_skip_object = sse.S_skip_object
S_skip_number = sse.S_skip_number
S_get_by_path = avx2.S_get_by_path
__GetByPath = avx2.F_get_by_path
__HTMLEscape = avx2.F_html_escape
Expand Down

0 comments on commit ccd6d3c

Please sign in to comment.