Skip to content

Commit 79b867e

Browse files
adraymairaw
authored andcommitted
Update the conditions insertion sort is used (#2736)
As the documentation is referencing exact numbers it should use the condition partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold.
1 parent 65771ac commit 79b867e

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

xml/System.Collections.Generic/List`1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3605,7 +3605,7 @@ Public Function StartsWith(e As Employee) As Boolean
36053605
36063606
This method uses the <xref:System.Array.Sort%2A?displayProperty=nameWithType> method, which applies the introspective sort as follows:
36073607
3608-
- If the partition size is fewer than 16 elements, it uses an insertion sort algorithm.
3608+
- If the partition size is less than or equal to 16 elements, it uses an insertion sort algorithm.
36093609
36103610
- If the number of partitions exceeds 2 log *n*, where *n* is the range of the input array, it uses a Heapsort algorithm.
36113611
@@ -3687,7 +3687,7 @@ Public Function StartsWith(e As Employee) As Boolean
36873687
36883688
This method uses the <xref:System.Array.Sort%2A?displayProperty=nameWithType> method, which applies the introspective sort as follows:
36893689
3690-
- If the partition size is fewer than 16 elements, it uses an insertion sort algorithm.
3690+
- If the partition size is less than or equal to 16 elements, it uses an insertion sort algorithm.
36913691
36923692
- If the number of partitions exceeds 2 log *n*, where *n* is the range of the input array, it uses a Heapsort algorithm.
36933693
@@ -3765,7 +3765,7 @@ Public Function StartsWith(e As Employee) As Boolean
37653765
37663766
This method uses <xref:System.Array.Sort%2A?displayProperty=nameWithType>, which applies the introspective sort as follows:
37673767
3768-
- If the partition size is fewer than 16 elements, it uses an insertion sort algorithm
3768+
- If the partition size is less than or equal to 16 elements, it uses an insertion sort algorithm
37693769
37703770
- If the number of partitions exceeds 2 log *n*, where *n* is the range of the input array, it uses a [Heapsort](https://en.wikipedia.org/wiki/Heapsort) algorithm.
37713771
@@ -3851,7 +3851,7 @@ Public Function StartsWith(e As Employee) As Boolean
38513851
38523852
This method uses <xref:System.Array.Sort%2A?displayProperty=nameWithType>, which applies the introspective sort as follows:
38533853
3854-
- If the partition size is fewer than 16 elements, it uses an insertion sort algorithm
3854+
- If the partition size is less than or equal to 16 elements, it uses an insertion sort algorithm
38553855
38563856
- If the number of partitions exceeds 2 log *n*, where *n* is the range of the input array, it uses a [Heapsort](https://en.wikipedia.org/wiki/Heapsort) algorithm.
38573857

0 commit comments

Comments
 (0)