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

Add internal Encoding.TryGetBytes #84609

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

stephentoub
Copy link
Member

Contributes to #84425

The above issue is about adding this as a public API to Encoding. For now, so we can use it from at least Utf8.TryWrite, I'm adding it as internal. Having the UTF8EncodingSealed stub in place will also unblock @EgorBo to make it an intrinsic, which will enable the literal portions of those strings to be encoded at JIT compile time rather than on each execution.

@ghost
Copy link

ghost commented Apr 11, 2023

Tagging subscribers to this area: @dotnet/area-system-text-encoding
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #84425

The above issue is about adding this as a public API to Encoding. For now, so we can use it from at least Utf8.TryWrite, I'm adding it as internal. Having the UTF8EncodingSealed stub in place will also unblock @EgorBo to make it an intrinsic, which will enable the literal portions of those strings to be encoded at JIT compile time rather than on each execution.

Author: stephentoub
Assignees: -
Labels:

area-System.Text.Encoding

Milestone: 8.0.0

@GrabYourPitchforks
Copy link
Member

/cc @tarekgh for awareness in case you think it's worth updating System.Text.Encoding.Extensions in the future.

@stephentoub stephentoub merged commit 19ff978 into dotnet:main Apr 11, 2023
@stephentoub stephentoub deleted the encodingtrygetbytesinternal branch April 11, 2023 10:44
@EgorBo
Copy link
Member

EgorBo commented Apr 20, 2023

@ghost ghost locked as resolved and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants