Files
java-interview-lab/merge-sort/output/07-comparison-counts.txt
T

21 lines
1.4 KiB
Plaintext

Element comparisons. random = new Random(7).nextInt(); worst = built by Data.worstCase
======================================================================================
n input top-down bottom-up skip-sorted worst bound
1,000 random 8,742 8,734 9,437 8,977
1,000 sorted 5,044 5,052 999 8,977
1,000 reversed 4,932 4,932 5,931 8,977
1,000 worst 8,977 8,976 9,976 8,977
1,024 random 8,963 8,963 9,634 9,217
1,024 sorted 5,120 5,120 1,023 9,217
1,024 reversed 5,120 5,120 6,143 9,217
1,024 worst 9,217 9,217 10,240 9,217
100,000 random 1,536,818 1,566,951 1,596,193 1,568,929
100,000 sorted 853,904 877,968 99,999 1,568,929
100,000 reversed 815,024 815,024 915,023 1,568,929
100,000 worst 1,568,929 1,585,582 1,668,928 1,568,929
1,048,576 random 19,646,187 19,646,187 20,337,833 19,922,945
1,048,576 sorted 10,485,760 10,485,760 1,048,575 19,922,945
1,048,576 reversed 10,485,760 10,485,760 11,534,335 19,922,945
1,048,576 worst 19,922,945 19,922,945 20,971,520 19,922,945