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

Remove optimizeForReading overloads from FrozenDictionary/Set #87988

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

stephentoub
Copy link
Member

We initially added these as a mitigation primarily for construction potentially being super slow. Now that enough optimization has been done to mitigate those performance concerns, we can get rid of the original mitgation and just have the surface area we initially wanted.

Contributes to #77891
Closes #87633

We initially added these as a mitigation primarily for construction potentially being super slow.  Now that enough optimization has been done to mitigate those performance concerns, we can get rid of the original mitgation and just have the surface area we initially wanted.
@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost ghost assigned stephentoub Jun 23, 2023
@ghost
Copy link

ghost commented Jun 23, 2023

Tagging subscribers to this area: @dotnet/area-system-collections
See info in area-owners.md if you want to be subscribed.

Issue Details

We initially added these as a mitigation primarily for construction potentially being super slow. Now that enough optimization has been done to mitigate those performance concerns, we can get rid of the original mitgation and just have the surface area we initially wanted.

Contributes to #77891
Closes #87633

Author: stephentoub
Assignees: -
Labels:

area-System.Collections, new-api-needs-documentation

Milestone: -

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, :shipit: !

@stephentoub is there any chance you know the code size difference?

@stephentoub
Copy link
Member Author

is there any chance you know the code size difference?

With improvements since the last time I measured months ago, it's improved a lot. Each <string, TValue> instantiation without all the optimization strategies looks to be adding ~25K. Each <string, TValue> instantiation with optimizeForReading:true looks to be adding ~50K. That's much better than it had been prior to efforts to drive it down, where it was closer to ~100K if I remember correctly.

@stephentoub stephentoub merged commit de6955b into dotnet:main Jun 26, 2023
@stephentoub stephentoub deleted the removeoptimizeforreading branch June 26, 2023 13:50
adamsitnik added a commit to adamsitnik/performance that referenced this pull request Jun 26, 2023
adamsitnik added a commit to adamsitnik/performance that referenced this pull request Jun 26, 2023
@stephentoub stephentoub added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Jun 26, 2023
@ghost ghost added the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Jun 26, 2023
@ghost
Copy link

ghost commented Jun 26, 2023

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

jeffhandley added a commit to dotnet/performance that referenced this pull request Jun 26, 2023
LoopedBard3 pushed a commit to dotnet/performance that referenced this pull request Jun 27, 2023
@ericstj ericstj added this to the 8.0.0 milestone Jun 28, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 29, 2023
@stephentoub stephentoub removed breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labels Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Additional ToFrozenDictionary overloads with optimizeForReading
3 participants