Skip to content
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

Improve performance of JSON encoding #1354

Merged
merged 6 commits into from
Mar 12, 2021
Merged

Improve performance of JSON encoding #1354

merged 6 commits into from
Mar 12, 2021

Conversation

qwwdfsad
Copy link
Member

Performance improvements, the same machine, Java 11:

CitmBenchmark.encodeCitm                               +41%
JacksonComparisonBenchmark.kotlinSmallToString         +70% 
JacksonComparisonBenchmark.kotlinToString              +339% (I've triple-checked that!)
JacksonComparisonBenchmark.kotlinToStringWithEscapes   +86%
TwitterBenchmark.encodeTwitter                         +71%
TwitterFeedBenchmark.encodeTwitter                     +101%

@qwwdfsad
Copy link
Member Author

qwwdfsad commented Feb 26, 2021

I suppose it's not really clear where all these improvements came from, so feel free to ask for additional comments, meanwhile, I'll try to document all my finding separately

@qwwdfsad qwwdfsad merged commit 333f9ff into dev Mar 12, 2021
@qwwdfsad qwwdfsad deleted the json-encoder-perf branch March 12, 2021 09:05
@ankushg
Copy link
Contributor

ankushg commented Jul 9, 2021

I suppose it's not really clear where all these improvements came from, so feel free to ask for additional comments, meanwhile, I'll try to document all my finding separately

These perf wins look great!

Out of curiosity, how many of the JSON<>String perf wins from 1.2 also apply to JSON<>dynamic?

@sandwwraith
Copy link
Member

@ankushg No, dynamic conversion is a different code part

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.

3 participants