dotnet/corefx — pull request #78 by richamsft (2014-11-14 00:48:11+00:00)
Title: Issue -

System.Collections.Immutable!ImmutableArray.Builder.Sort (3 overloads)
creates a new Comparer wrapper each time. This can get expensive if you call Sort a lot.

Fix- This fix optmizes method Sort() alone among the 3 overloads. Sort() uses the default comparer which through this fix is getting cached into a static field in type Comparer such that the Comparer wrapper is not created each time Sort() is called.

Existing testcase Sort(), covers this case.