ordenacao -l -r -s7654321 (10 sequencias aleatorias) n bubble bubble2 shaker selecao insere insereS insereB shell heap quickCLR 256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 512 0.01 0.01 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1024 0.03 0.02 0.02 0.01 0.00 0.01 0.00 0.00 0.00 0.00 2048 0.09 0.11 0.07 0.03 0.02 0.01 0.01 0.00 0.01 0.00 4096 0.37 0.41 0.27 0.14 0.06 0.04 0.06 0.01 0.00 0.00 8192 1.70 1.77 1.12 0.71 0.29 0.22 0.30 0.02 0.01 0.01 16384 7.08 7.33 4.75 3.05 1.55 1.25 1.60 0.03 0.02 0.01 32768 28.54 29.32 19.30 12.33 6.88 5.61 7.08 0.08 0.04 0.04 65536 113.55 116.95 77.64 49.17 28.37 23.17 28.83 0.16 0.10 0.08 131072 493.08 506.67 323.34 224.09 121.01 105.44 115.89 0.39 0.23 0.17 ordenacao -l -r -c (ordem crescente) n bubble bubble2 shaker selecao insere insereS insereB shell heap quickCLR 256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 512 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.00 1024 0.01 0.00 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.01 2048 0.04 0.00 0.00 0.04 0.00 0.00 0.00 0.00 0.00 0.03 4096 0.19 0.00 0.00 0.14 0.00 0.00 0.01 0.00 0.00 0.12 8192 0.90 0.00 0.00 0.73 0.00 0.00 0.00 0.01 0.01 0.54 16384 3.89 0.00 0.00 3.10 0.00 0.00 0.01 0.01 0.02 2.33 32768 15.73 0.00 0.00 12.52 0.00 0.00 0.02 0.02 0.03 9.31 65536 64.10 0.00 0.00 50.57 0.01 0.00 0.12 0.04 0.07 38.40 131072 311.70 0.01 0.01 251.12 0.01 0.01 0.08 0.11 0.16 206.01 ordenacao -l -r -d (ordem decrescente) n bubble bubble2 shaker selecao insere insereS insereB shell heap quickCLR 256 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 512 0.00 0.01 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 1024 0.01 0.02 0.02 0.01 0.00 0.01 0.01 0.00 0.00 0.01 2048 0.06 0.08 0.07 0.03 0.03 0.02 0.03 0.00 0.00 0.03 4096 0.28 0.29 0.28 0.15 0.11 0.07 0.11 0.00 0.01 0.11 8192 1.30 1.25 1.20 0.71 0.75 0.56 0.78 0.00 0.01 0.50 16384 5.41 5.15 4.98 3.01 3.45 2.57 3.59 0.02 0.01 2.23 32768 23.59 22.19 20.56 13.28 14.56 11.21 14.56 0.03 0.03 9.69 65536 91.07 85.88 84.66 51.16 67.98 55.89 59.67 0.07 0.07 41.18 131072 361.67 339.09 341.04 204.23 244.55 207.27 222.73 0.15 0.15 164.99 Legenda: bubble = bubblesort (ordenacao por troca) bubble2 = bubblesort com marcado de ultima troca shaker = shakersort selecao = ordenacao por selecao insere = ordenacao por insercao insereS = ordenacao por insercao (livro do Sedgewick) insereB = ordenacao por insercao binaria shell = shellsort (Knuth) heap = heapsort quickCLR = quicksort do livro do Cormen, Leiserson e Rivest compilador: gcc -O2 computador: Pentium II, 233Mhz, 128Mbytes