-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add an additional length check to FrozenDictionary and FrozenSet #92546
Merged
adamsitnik
merged 9 commits into
dotnet:main
from
andrewjsaid:frozen-collections-length-filter
Dec 11, 2023
Merged
Add an additional length check to FrozenDictionary and FrozenSet #92546
adamsitnik
merged 9 commits into
dotnet:main
from
andrewjsaid:frozen-collections-length-filter
Dec 11, 2023
Commits on Sep 23, 2023
-
Add an additional length check to FrozenDictionary and FrozenSet
On construction of the collection, we compute an unsigned long which is effectively 64 boolean flags, each representing the presence of a key string of a particular length (mod 64). When reading from the collection, we can exit early if the key being tested does not map to a bit which has been switched on by the original compuation. I believe this has similarities to how Bloom Filters work. This adds a relatively small cost on creation of the collection as small cost to each read operation. However it can speed up reads with certain data patterns especially when the difference between the maximum and minimum key length is large but there aren't many different lengths.
Configuration menu - View commit details
-
Copy full SHA for 189615d - Browse repository at this point
Copy the full SHA 189615dView commit details
Commits on Oct 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 641929e - Browse repository at this point
Copy the full SHA 641929eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 39a44df - Browse repository at this point
Copy the full SHA 39a44dfView commit details
Commits on Oct 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 18c48f8 - Browse repository at this point
Copy the full SHA 18c48f8View commit details
Commits on Oct 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ad45927 - Browse repository at this point
Copy the full SHA ad45927View commit details -
It is probably an opinionated change which isn't right.
Configuration menu - View commit details
-
Copy full SHA for 96962d7 - Browse repository at this point
Copy the full SHA 96962d7View commit details
Commits on Nov 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 85e5715 - Browse repository at this point
Copy the full SHA 85e5715View commit details
Commits on Nov 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c339f28 - Browse repository at this point
Copy the full SHA c339f28View commit details
Commits on Nov 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8841016 - Browse repository at this point
Copy the full SHA 8841016View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.