Skip to content

Hot path for ascii output #1151

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 1 commit into
base: next
Choose a base branch
from
Open

Conversation

jwbee
Copy link

@jwbee jwbee commented May 25, 2025

I noticed in the profiles of my workload that EncodeCharToUTF8Bytes was extremely hot, and that virtually all of the cost was in the function prologue and epilogue because the inputs are all ASCII. This PR adds a hot path for ASCII that is small enough to inline at all the call sites, with a fallback to the existing function when necessary.

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