-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't allocate temporaries in FrameworkNameProvider.GetVersionString
Previously this would allocate a stack, enumerators, and a copy of the stack (for a call to Linq's `Reverse`). With this change all state required to produce the version string is kept on the stack. The unit test coverage for this method has been increased. Also the allocation of an empty `Version` was removed in the `Try*` methods when they return false, to make them match their signatures and avoid a wasted allocation. Consuming code in this repo has been reviewed, and the behaviour captured in unit tests.
- Loading branch information
1 parent
a5bf9a8
commit 998ccd3
Showing
2 changed files
with
165 additions
and
83 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