-
Notifications
You must be signed in to change notification settings - Fork 5k
Make {Try}GetAlternateLookup methods for Dictionary/HashSet instance instead of extensions #106107
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
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/area-system-collections |
…hSet We made them extension methods instead of instance methods to avoid potential native code size bloat. But the ergonomics of using these without partial generic inference is a bit painful, and we've had reports that it makes them harder to understand. This moves them to be instance methods, and we'll measure the impact on code size to re-evaluate the decision.
3099df8
to
26e6c6e
Compare
Discussed offline with @jkotas, @MichalStrehovsky, @terrajobst, and @eiriktsarpalis. After gathering some data and discussing, it turns out that generic methods (whether or not on a generic type) don't have the same concerning effect on Native AOT code size as do non-generic methods on generic types. We've agreed to go ahead with this improvement. |
We made them extension methods instead of instance methods to avoid potential native code size bloat. But the ergonomics of using these without partial generic inference is a bit painful, and we've had reports that it makes them harder to understand. This moves them to be instance methods, and we'll measure the impact on code size to re-evaluate the decision.