I can't find the documentation of Java 7, I only find about the Java 6, which is still quick or merge. Does anyone know how to find the documentation of the method Arrays.Sort of Java 7? Thank you.
Java 7 uses Dual-Pivot Quicksort for primitives and TimSort for objects.
According to the Java 7 draft API doc for primitives:
Implementation note: The sorting algorithm is a Dual-Pivot Quicksort by Vladimir Yaroslavskiy, Jon Bentley, and Joshua Bloch. This algorithm offers O(n log(n)) performance on many data sets that cause other quicksorts to degrade to quadratic performance, and is typically faster than traditional (one-pivot) Quicksort implementations.
According to the Java 7 draft API doc for objects:
The implementation was adapted from Tim Peters's list sort for Python ( TimSort). It uses techiques from Peter McIlroy's "Optimistic Sorting and Information Theoretic Complexity", in Proceedings of the Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474, January 1993.
Not sure if this is much different from what it was in Java 6:
a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993)
Yes, Java 7 will use Timsort for Arrays.sort. Here is the commit http://hg.openjdk.java.net/jdk7/tl/jdk/rev/bfd7abda8f79