-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.CollectionsenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstenet-performancePerformance related issuePerformance related issue
Milestone
Description
SortedSet.InOrderTreeWalk currently uses a stack on which the nodes to walk are pushed/popped: https://github.com/dotnet/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/SortedSet.cs#L234
It looks like it would be possible to implement this recursively instead, i.e. InOrderTreeWalk(left); action(current); InOrderTreeWalk(right) and eliminate the Stack allocation.
Metadata
Metadata
Assignees
Labels
area-System.CollectionsenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstenet-performancePerformance related issuePerformance related issue