Skip to content

add intial benchmarks#8

Open
AliBasicCoder wants to merge 2 commits intoTinyChain-Inc:mainfrom
AliBasicCoder:benchmarks
Open

add intial benchmarks#8
AliBasicCoder wants to merge 2 commits intoTinyChain-Inc:mainfrom
AliBasicCoder:benchmarks

Conversation

@AliBasicCoder
Copy link
Copy Markdown

@AliBasicCoder AliBasicCoder commented Oct 15, 2024

add benchmarks

you can run benchmarks via

cargo bench --features value

debugging issue #7

@AliBasicCoder
Copy link
Copy Markdown
Author

i generated the json via json-generator.com not with code so i included it
you can removed it and choose some library to generate the json

@AliBasicCoder
Copy link
Copy Markdown
Author

i manged to fix the panic unexpected end of stream in collect_chunks test
unfortunately the issue #7 still remains

@AliBasicCoder
Copy link
Copy Markdown
Author

after looking into the code i think this problem is cause by the constant modification of the buffer in the decoder all over the deserialization code like in methods buffer and buffer_string

unfortunately if this is the case, a lot of the deserialization code will need to be modified
also i suspect that this causes performance to suffer considering that at the best case destream_json does this task in around 400ms while serde_json does it in around 80ms (around 5x faster)

@haydnv
Copy link
Copy Markdown
Collaborator

haydnv commented Feb 17, 2025

Hi Ali, sorry I missed this! Your analysis is super helpful. Can you please remove the generated.json file from the commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants