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

Update strongly-typed record Equals method #51136

Closed
333fred opened this issue Feb 10, 2021 · 1 comment · Fixed by #51149
Closed

Update strongly-typed record Equals method #51136

333fred opened this issue Feb 10, 2021 · 1 comment · Fixed by #51149
Assignees
Labels
Area-Compilers Feature - Records Records help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone

Comments

@333fred
Copy link
Member

333fred commented Feb 10, 2021

We need to add a short-circuit in the strongly-typed Equals method we generate for record equality to ensure that, if the same instance is being compared for equality, we immediately return true. See dotnet/csharplang#39 (comment) for a benchmark of the perf consequences of this. /cc @jcouv.

@333fred 333fred added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 10, 2021
@333fred 333fred added this to the 16.10 milestone Feb 10, 2021
@333fred 333fred added the Feature - Records Records label Feb 10, 2021
@jcouv jcouv added help wanted The issue is "up for grabs" - add a comment if you are interested in working on it and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 11, 2021
@Youssef1313
Copy link
Member

Opened #51149 to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - Records Records help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants