From b895b0930f6d50a3d0c2362e50c6ff8ca407d2fe Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 10:40:10 +0800 Subject: [PATCH 1/7] chore: update loader --- .github/workflows/benchmark.yml | 14 ++++++-------- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 63e40b42d..193548d47 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -30,9 +30,9 @@ jobs: continue-on-error: true run: | export SONIC_NO_ASYNC_GC=1 - go test -run ^$ -count=100 -benchmem -bench 'BenchmarkDecoder_(Generic|Binding)_Sonic' ./decoder >> /var/tmp/sonic_bench_target_${{ github.run_id }}.out - go test -run ^$ -count=100 -benchmem -bench 'BenchmarkEncoder_(Generic|Binding)_Sonic' ./encoder >> /var/tmp/sonic_bench_target_${{ github.run_id }}.out - go test -run ^$ -count=100 -benchmem -bench 'Benchmark(Get|Set)One_Sonic|BenchmarkParseSeven_Sonic' ./ast >> /var/tmp/sonic_bench_target_${{ github.run_id }}.out + go test -run ^$ -count=20 -benchmem -bench 'BenchmarkDecoder_(Generic|Binding)_Sonic' ./decoder >> /var/tmp/sonic_bench_target_${{ github.run_id }}.out + go test -run ^$ -count=20 -benchmem -bench 'BenchmarkEncoder_(Generic|Binding)_Sonic' ./encoder >> /var/tmp/sonic_bench_target_${{ github.run_id }}.out + go test -run ^$ -count=20 -benchmem -bench 'Benchmark(Get|Set)One_Sonic|BenchmarkParseSeven_Sonic' ./ast >> /var/tmp/sonic_bench_target_${{ github.run_id }}.out - name: Clear repository run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE @@ -46,12 +46,10 @@ jobs: continue-on-error: true run: | export SONIC_NO_ASYNC_GC=1 - UNIQUE_ID=${{ github.run_id }} - go test -run ^$ -count=100 -benchmem -bench 'BenchmarkDecoder_(Generic|Binding)_Sonic' ./decoder >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out - go test -run ^$ -count=100 -benchmem -bench 'BenchmarkEncoder_(Generic|Binding)_Sonic' ./encoder >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out - go test -run ^$ -count=100 -benchmem -bench 'Benchmark(Get|Set)One_Sonic|BenchmarkParseSeven_Sonic' ./ast >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out + go test -run ^$ -count=20 -benchmem -bench 'BenchmarkDecoder_(Generic|Binding)_Sonic' ./decoder >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out + go test -run ^$ -count=20 -benchmem -bench 'BenchmarkEncoder_(Generic|Binding)_Sonic' ./encoder >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out + go test -run ^$ -count=20 -benchmem -bench 'Benchmark(Get|Set)One_Sonic|BenchmarkParseSeven_Sonic' ./ast >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out - name: Diff bench - continue-on-error: true run: | ./scripts/bench.py -t 0.20 -d /var/tmp/sonic_bench_target_${{ github.run_id }}.out,/var/tmp/sonic_bench_main_${{ github.run_id }}.out x diff --git a/go.mod b/go.mod index c323a7cf9..e652b48f7 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/bytedance/sonic go 1.17 require ( - github.com/bytedance/sonic/loader v0.2.0 + github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 github.com/cloudwego/base64x v0.1.4 github.com/davecgh/go-spew v1.1.1 github.com/klauspost/cpuid/v2 v2.0.9 diff --git a/go.sum b/go.sum index ee7f50c6a..1ab4cfd5b 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= From e59fe591ee812d71fea4d71bbc74352ecb64807a Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 10:50:27 +0800 Subject: [PATCH 2/7] lint exclude `loader/internal/iasm` --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2aba642f8..3a5add1d1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,3 +9,5 @@ jobs: - uses: actions/checkout@v4 - name: spell check uses: codespell-project/actions-codespell@v2 + with: + exclude_file: loader/internal/iasm From 2144b394bf09a3094e0e388259c97cd643ea9223 Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 13:22:42 +0800 Subject: [PATCH 3/7] update --- external_jsonlib_test/go.mod | 3 +-- external_jsonlib_test/go.sum | 4 +--- fuzz/go.mod | 3 +-- fuzz/go.sum | 4 +--- generic_test/go.mod | 3 +-- generic_test/go.sum | 4 +--- go.mod | 1 - go.sum | 3 --- go.work.sum | 1 + 9 files changed, 7 insertions(+), 19 deletions(-) diff --git a/external_jsonlib_test/go.mod b/external_jsonlib_test/go.mod index 38f3958c3..ae2c92afa 100644 --- a/external_jsonlib_test/go.mod +++ b/external_jsonlib_test/go.mod @@ -13,9 +13,8 @@ require ( ) require ( - github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 // indirect github.com/cloudwego/base64x v0.1.4 // indirect - github.com/cloudwego/iasm v0.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect diff --git a/external_jsonlib_test/go.sum b/external_jsonlib_test/go.sum index 5ded92db3..9f53fe17f 100644 --- a/external_jsonlib_test/go.sum +++ b/external_jsonlib_test/go.sum @@ -1,11 +1,9 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= -github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/fuzz/go.mod b/fuzz/go.mod index 2d3dd82ef..1592b302f 100644 --- a/fuzz/go.mod +++ b/fuzz/go.mod @@ -10,9 +10,8 @@ require ( ) require ( - github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 // indirect github.com/cloudwego/base64x v0.1.4 // indirect - github.com/cloudwego/iasm v0.2.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect diff --git a/fuzz/go.sum b/fuzz/go.sum index 85bc056df..a92921c79 100644 --- a/fuzz/go.sum +++ b/fuzz/go.sum @@ -1,11 +1,9 @@ github.com/bytedance/gopkg v0.0.0-20221122125632-68358b8ecec6 h1:FCLDGi1EmB7JzjVVYNZiqc/zAJj2BQ5M0lfkVOxbfs8= github.com/bytedance/gopkg v0.0.0-20221122125632-68358b8ecec6/go.mod h1:5FoAH5xUHHCMDvQPy1rnj8moqLkLHFaDVBjHhcFwEi0= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= -github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/generic_test/go.mod b/generic_test/go.mod index f565dca8c..eb00c0e95 100644 --- a/generic_test/go.mod +++ b/generic_test/go.mod @@ -10,9 +10,8 @@ require ( ) require ( - github.com/bytedance/sonic/loader v0.2.0 // indirect + github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 // indirect github.com/cloudwego/base64x v0.1.4 // indirect - github.com/cloudwego/iasm v0.2.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect diff --git a/generic_test/go.sum b/generic_test/go.sum index 1eb65c6e2..e7856d699 100644 --- a/generic_test/go.sum +++ b/generic_test/go.sum @@ -1,9 +1,7 @@ github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= -github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/go.mod b/go.mod index e652b48f7..bb716a9cc 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( ) require ( - github.com/cloudwego/iasm v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1ab4cfd5b..40c022225 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,8 @@ github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM= -github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= -github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/go.work.sum b/go.work.sum index d59625879..a7ee52a73 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1 +1,2 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= From 5b5c67e44d8ba7f6c21e10703af8148dd89dbfc0 Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 13:47:24 +0800 Subject: [PATCH 4/7] update --- external_jsonlib_test/go.sum | 1 + fuzz/go.sum | 1 + generic_test/go.sum | 1 + 3 files changed, 3 insertions(+) diff --git a/external_jsonlib_test/go.sum b/external_jsonlib_test/go.sum index 9f53fe17f..90d4c193f 100644 --- a/external_jsonlib_test/go.sum +++ b/external_jsonlib_test/go.sum @@ -2,6 +2,7 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/fuzz/go.sum b/fuzz/go.sum index a92921c79..4a1ddb991 100644 --- a/fuzz/go.sum +++ b/fuzz/go.sum @@ -2,6 +2,7 @@ github.com/bytedance/gopkg v0.0.0-20221122125632-68358b8ecec6 h1:FCLDGi1EmB7JzjV github.com/bytedance/gopkg v0.0.0-20221122125632-68358b8ecec6/go.mod h1:5FoAH5xUHHCMDvQPy1rnj8moqLkLHFaDVBjHhcFwEi0= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/generic_test/go.sum b/generic_test/go.sum index e7856d699..8354425f9 100644 --- a/generic_test/go.sum +++ b/generic_test/go.sum @@ -1,5 +1,6 @@ github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= +github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= From d4b5e4765471b85e5c023954e3ad8aac62e87b62 Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 14:25:45 +0800 Subject: [PATCH 5/7] update --- .github/workflows/benchmark.yml | 1 + .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 193548d47..28ec2cb5d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -51,5 +51,6 @@ jobs: go test -run ^$ -count=20 -benchmem -bench 'Benchmark(Get|Set)One_Sonic|BenchmarkParseSeven_Sonic' ./ast >> /var/tmp/sonic_bench_main_${{ github.run_id }}.out - name: Diff bench + continue-on-error: true run: | ./scripts/bench.py -t 0.20 -d /var/tmp/sonic_bench_target_${{ github.run_id }}.out,/var/tmp/sonic_bench_main_${{ github.run_id }}.out x diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a5add1d1..3226728fd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,4 +10,4 @@ jobs: - name: spell check uses: codespell-project/actions-codespell@v2 with: - exclude_file: loader/internal/iasm + skip: loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/x86_64/encodings.go:720,loader/internal/iasm/x86_64/program.go:115,loader/internal/iasm/x86_64/program.go:472,loader/internal/iasm/x86_64/program.go:472,loader/internal/iasm/expr/ast.go:23,loader/internal/iasm/expr/errors.go:40 From 6db913675a587d0e840a7b00f6f07bdc4f49b6ac Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 15:15:58 +0800 Subject: [PATCH 6/7] update --- external_jsonlib_test/go.mod | 2 +- external_jsonlib_test/go.sum | 4 ++-- fuzz/go.mod | 2 +- fuzz/go.sum | 4 ++-- generic_test/go.mod | 2 +- generic_test/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- go.work.sum | 1 + 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/external_jsonlib_test/go.mod b/external_jsonlib_test/go.mod index ae2c92afa..8d4b1a531 100644 --- a/external_jsonlib_test/go.mod +++ b/external_jsonlib_test/go.mod @@ -13,7 +13,7 @@ require ( ) require ( - github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 // indirect + github.com/bytedance/sonic/loader v0.2.2 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect diff --git a/external_jsonlib_test/go.sum b/external_jsonlib_test/go.sum index 90d4c193f..aa13da7ab 100644 --- a/external_jsonlib_test/go.sum +++ b/external_jsonlib_test/go.sum @@ -1,8 +1,8 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/fuzz/go.mod b/fuzz/go.mod index 1592b302f..30698a7c8 100644 --- a/fuzz/go.mod +++ b/fuzz/go.mod @@ -10,7 +10,7 @@ require ( ) require ( - github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 // indirect + github.com/bytedance/sonic/loader v0.2.2 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/fuzz/go.sum b/fuzz/go.sum index 4a1ddb991..8bcc2570f 100644 --- a/fuzz/go.sum +++ b/fuzz/go.sum @@ -1,8 +1,8 @@ github.com/bytedance/gopkg v0.0.0-20221122125632-68358b8ecec6 h1:FCLDGi1EmB7JzjVVYNZiqc/zAJj2BQ5M0lfkVOxbfs8= github.com/bytedance/gopkg v0.0.0-20221122125632-68358b8ecec6/go.mod h1:5FoAH5xUHHCMDvQPy1rnj8moqLkLHFaDVBjHhcFwEi0= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/generic_test/go.mod b/generic_test/go.mod index eb00c0e95..20693cc24 100644 --- a/generic_test/go.mod +++ b/generic_test/go.mod @@ -10,7 +10,7 @@ require ( ) require ( - github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 // indirect + github.com/bytedance/sonic/loader v0.2.2 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect diff --git a/generic_test/go.sum b/generic_test/go.sum index 8354425f9..eccc76d2e 100644 --- a/generic_test/go.sum +++ b/generic_test/go.sum @@ -1,6 +1,6 @@ github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/go.mod b/go.mod index bb716a9cc..fa2229850 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/bytedance/sonic go 1.17 require ( - github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 + github.com/bytedance/sonic/loader v0.2.2 github.com/cloudwego/base64x v0.1.4 github.com/davecgh/go-spew v1.1.1 github.com/klauspost/cpuid/v2 v2.0.9 diff --git a/go.sum b/go.sum index 40c022225..66352e717 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417 h1:1zODWaNhNntwVrdtpR+28MOuWu1/f5T2T/f+9qA7DcE= -github.com/bytedance/sonic/loader v0.2.2-0.20250105060703-1ee5fa8eb417/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= +github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= diff --git a/go.work.sum b/go.work.sum index a7ee52a73..b434dee51 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,2 +1,3 @@ github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= From 34d1bece701efee98a8d738ec7a69aff0757b0f2 Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 7 Jan 2025 15:19:19 +0800 Subject: [PATCH 7/7] update --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3226728fd..e8ae2b90a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,4 +10,4 @@ jobs: - name: spell check uses: codespell-project/actions-codespell@v2 with: - skip: loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/x86_64/encodings.go:720,loader/internal/iasm/x86_64/program.go:115,loader/internal/iasm/x86_64/program.go:472,loader/internal/iasm/x86_64/program.go:472,loader/internal/iasm/expr/ast.go:23,loader/internal/iasm/expr/errors.go:40 + skip: loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/obj/macho.go,loader/internal/iasm/x86_64/encodings.go:720,loader/internal/iasm/x86_64/program.go,loader/internal/iasm/x86_64/program.go,loader/internal/iasm/x86_64/program.go,loader/internal/iasm/expr/ast.go,loader/internal/iasm/expr/errors.go