Skip to content

Add internal Encoding.TryGetBytes - #84609

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:encodingtrygetbytesinternal
Apr 11, 2023
Merged

Add internal Encoding.TryGetBytes#84609
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:encodingtrygetbytesinternal

Conversation

@stephentoub

Copy link
Copy Markdown
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.

@stephentoub stephentoub added this to the 8.0.0 milestone Apr 11, 2023
@ghost ghost assigned stephentoub Apr 11, 2023
@ghost

ghost commented Apr 11, 2023

Copy link
Copy Markdown

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
Copy Markdown
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

EgorBo commented Apr 20, 2023

Copy link
Copy Markdown
Member

@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