Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[optimization] Replace 'new T[0]' with 'Array.Empty<T> ()' to reduce …
…allocations. (#6162) `Array.Empty` internally will cache types so that after the first use remaining calls will use the cached version. This means we end up with only 1 allocation for type rather than 1 allocation per instance. Code in the future should use the `Array.Empty<T> ()` pattern rather than the usual `new T[0]` which we use. While this might seem like a small thing given the number of places we use this, we should at least try to improve or performance where we can :)
- Loading branch information
1 parent
60efd75
commit 550325a
Showing
32 changed files
with
236 additions
and
234 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.