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

chore: reduce usage of ToUpper #3874

Merged
merged 1 commit into from
Oct 6, 2024
Merged

chore: reduce usage of ToUpper #3874

merged 1 commit into from
Oct 6, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Oct 6, 2024

We would like to stop passing MutableSlice as arguments and removing ToUpper is the first step to it.

We would like to stop passing MutableSlice as arguments and removing ToUpper
is the first step to it.

Signed-off-by: Roman Gershman <[email protected]>
@romange romange requested a review from chakaz October 6, 2024 12:13
Copy link
Collaborator

@chakaz chakaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously, this will add allocations, some of them may be on the hot path. I wonder what's the rationale behind wanting to remove ToUpper()?

@romange
Copy link
Collaborator Author

romange commented Oct 6, 2024

Actually not obviously. Most options are less than 16 chars and we rely here on SSO that will contain the value on stack.

@romange romange merged commit 45aba13 into main Oct 6, 2024
12 checks passed
@romange romange deleted the Pr2 branch October 6, 2024 18:45
@chakaz
Copy link
Collaborator

chakaz commented Oct 6, 2024

Actually not obviously. Most options are less than 16 chars and we rely here on SSO that will contain the value on stack.

yeah, that's a very good point

kostasrim pushed a commit that referenced this pull request Oct 7, 2024
We would like to stop passing MutableSlice as arguments and removing ToUpper
is the first step to it.

Signed-off-by: Roman Gershman <[email protected]>
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.

2 participants