What is the algorithm used by sort() method on Array class in .NET? -


msdn description sort() method says :

sorts elements in entire one-dimensional array using icomparable implementation of each element of array.

i checked icomparable didn't find thing indicating sort algorithm being used.

i need know how sort() method parallel processing friendly.

does know algorithm sort() method on array class using?

from msdn documentation:

this method uses introspective sort (introsort) algorithm follows:

  • if partition size fewer 16 elements, uses insertion sort algorithm.

  • if number of partitions exceeds 2 * logn, n range of input array, uses heapsort algorithm.

  • otherwise, uses quicksort algorithm.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -