Skip to content

CSHARP-5531: Optimize the conversion from an array index to UTF-8 byte arrays #1672

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dear-gary
Copy link
Contributor

  1. Use Utf8Formatter.TryFormat API to avoid string allocations and write directly to a reused byte[]
  2. Define a byte[] member in BsonBinaryWriter class and reuse it to avoid byte[] allocations

seeCSHARP-5531 for more details

@dear-gary dear-gary requested a review from a team as a code owner April 16, 2025 09:40
@dear-gary dear-gary requested review from JamesKovacs and removed request for a team April 16, 2025 09:40
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.

1 participant