forked from dotnet/runtime
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance for GetViewBetween and enumerating TreeSubSet (do…
…tnet/corefx#30921) * Improve performance for GetViewBetween and enumerating TreeSubSet * VersionCheckImpl is not called within the constructor * count does not get updated by VersionCheckImpl * count is now updated within VersionCheckCount which is only called when retrieving Count property. As a result count has been replaced with Count inside TreeSubSet/SortedSet where nessessary. * For TreeSubSet the enumerator now uses the Count of the parent set (entire tree) when creating the stack. This results in a larger stack size, however it eliminates the need to get the count of TreeSubSet, which drastically increases the performance. * Cleaned up code and added comments * Fixed logic error with updateCount * Removed unnecessary blank line * Changed VersionCheckCount -> VersionCheck * Cleaning code Commit migrated from dotnet/corefx@cc4d621
- Loading branch information
1 parent
aac9805
commit 218f597
Showing
2 changed files
with
29 additions
and
8 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