-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Optimize ArgumentOutOfRangeException throw helpers
#119234
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
base: main
Are you sure you want to change the base?
Conversation
* Move throw helpers to `ThrowHelpers` * Reduce code size by boxing values in cold path
|
I do not see any end-to-end improvements here, only regressions. |
|
What's the intention behind optimizing the cold throw helpers? |
Purely to reduce code size, since the generic methods end up being instantiated with many different types. |
I wonder why they are inlined for |
|
|
|
Tagging subscribers to this area: @dotnet/area-system-runtime |
krwq
left a comment
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.
@xtqqczze thanks for attempts on improving this. Looking at MichalStrehovsky/rt-sz#188 this looks like it's regressing more than it optimizes. Please let us know if you'll be trying to improve this or if we should close this PR.
ThrowHelpers