New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would you please add goccy/go-json as a benchmark target ? #17
Comments
Here is The Benchmark results for our data:
It seems your optimization works great in small json, but has some scalability problems. Welcome to use Sonic as your benchmark, too. |
@AsterDY |
Also, I created PR ( goccy/go-json#254 ) to add your library to the benchmark target |
Actually we use the well-know big twitter json as our large data, you can just try it. As for medium, it is our practical business data which can't be open —— But its scale is close to the bench sample we use. |
Add your lib for benchmarks too, cc https://github.com/bytedance/sonic/pull/23/files . It seems the 'Large' you defined is smaller than our 'Medium'. |
Thank you for the replying. Also, thank you for adding to the your benchmark. |
Later we will post our entire bench system filtering commercial data, which takes a little time. And I can tell you that it's all just 'box-open' use like decoder/decoder_test.go, maybe try run them by yourself at present? I think the key factor is the scale and schema of data |
I mention this benchmark result. Looking at the repository, I couldn't find any code generating this benchmark result. |
@PureWhiteWu |
@AsterDY please take a look |
|
Let's delete the benchmark results which used our internal commercial data. They are not reproducable in the open source community. |
Again, I asked you to put the following like code here. func NewLaurgePayload() {
return struct{}{} // dummy type because actual type is internal data
}
func BenchmarkMarhsalLargeStruct_Stdjson(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
if _, err := json.Marshal(NewLargePayload()); err != nil {
b.Fatal(err)
}
}
} This is because the code in the above function may be wrong in the first place, resulting in unfair data. So if you want to show the result, you have to show the code to prove that the result is valid, but I'm not asking for the same data. It doesn't have to be reproducible, so I wanted to see the source code you used ( The logic of the benchmark itself ). |
Anyway. You are welcome to use data https://github.com/bytedance/sonic/blob/main/testdata/twitterescaped.json and https://github.com/bytedance/sonic/blob/main/decoder/testdata_test.go to write code in the way you like and submit another PR. But don't forget to compare generic-codec case( |
This is basicly the code we used for general usage test. Take a little time to move on this repo |
I develop goccy/go-json.
Since this library has same concept of yours about compatibility with
encoding/json
and high performance,I would be grateful if you could add it to the benchmark target.
The text was updated successfully, but these errors were encountered: