This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Use Array.Empty in a few places - #1242
Merged
Merged
Conversation
Member
There was a problem hiding this comment.
This is always used as new Container().Resize() - that allocates a bunch of unnecessary garbage. It would be better to just allocate the arrays of the right size here to avoid all the garbage instead of patching over it with Array.Empty.
Member
|
LGTM. Thanks! |
Member
You have several months old snapshot of the repo. The head has .gitignore for these files. |
Member
There was a problem hiding this comment.
_buckets.Length == 0 condition can be removed now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This changes a couple of files throughout the repo to use
Array.Empty<T>in place ofnew T[0], saving some unnecessary allocations.Some of the classes affected:
ListEnvironmentTaskConditionalWeakTablecc @jkotas