-
Notifications
You must be signed in to change notification settings - Fork 494
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
Performance: Fixes encoded strings performance #2056
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors) Description"
Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.
2588775
to
f654b42
Compare
f654b42
to
c6a284f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code looks good to me. Once I get back to a computer I will run the benchmarks on my machine and update the baselines.
Thanks for making the change :)
This is not Internal though, right? If it would benefit end users, so can we change the title? |
No user uses binary writer, so it's still internal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the change. Very excited for the 2x speed up on the binary string write path!
Pull Request Template
Description
This PR optimizes encoded string performance by:
Before:
After:
BinaryNaive exclusively uses public SDK primitives, whereas BinaryBlitting uses the typed JSON shortcuts. The EnableEncodedStrings has no impact on Text run.
Benchmark Updates
Text Navigator to Binary Writer
Before
After
30% reduction in time and 10% reduction in memory
Binary String Write MicroBenchmark
Before
After
half the time
Type of change
Closing issues
To automatically close an issue: closes #IssueNumber