-
Notifications
You must be signed in to change notification settings - Fork 10.3k
SkipLocalsInit on methods with stackalloc #32567
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
Conversation
@@ -27,6 +28,7 @@ public DfaMatcher(ILogger<DfaMatcher> logger, EndpointSelector selector, DfaStat | |||
_isDefaultEndpointSelector = selector is DefaultEndpointSelector; | |||
} | |||
|
|||
[SkipLocalsInit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, you'll get better performance if you change line 48 to use a const value rather than a variable value. If it's impractical to do so, no change needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I noticed that. I don't want to mess with it in this PR: #32569 😄
Hello @JamesNK! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Like #26598 but explicitly adds the attribute on only some methods. The benefit is smaller but less likely to cause bugs.