

Specifically, ~2% of the values in the array are re-randomized and then Array.sort() is applied again. The orange data shows the performance of Array.sort() for a mostly sorted array.That is to say, 95% of the data points lie between these curves. The curved line shows the median of the data in the form of N * Log( N ), and the dotted curves show the 95% bounds, again in the form of N * Log( N ). The blue data is the performance of Array.sort() for 500 test cases of random length arrays (from 100 to 500,000 elements) randomly filled with integers.The charts below each show two sets of data points: Despite Timsort having a better Big O profile than Merge sort (see ), empirical testing shows that the implementation of Timsort in Chrome's V8 engine is clearly outperformed on average by the implementation of Merge sort in Firefox.

