public class Useint { public static void main ( String args[] ) { int n = Integer.parseInt(args[0]); System.out.println(n); int [] arr = Intsort.fillarray(n); Intsort.heapsort(arr, n); System.out.println(Intsort.sorted(arr, n)); } } /* Running Sun's Java version "chapman:10/12/12-23:12" on a Linux 150 MHz Pentium 64 MB RAM: udvsort quicksort hobsort 1000 1.930 0.610 0.710 5000 33.470 1.130 1.580 10000 1.760 2.740 20000 3.030 5.280 30000 4.350 7.800 50000 7.010 13.240 100000 13.830 27.740 200000 27.790 57.570 Running Sun's Java version "root:08/30/97-09:42" on a Linux 266 MHz Pentium II 128 MB RAM notebook (Dell): udvsort quicksort hobsort 1000 0.600 0.380 0.400 5000 5.740 0.490 0.640 10000 21.980 0.600 0.880 20000 0.830 1.500 30000 1.060 2.090 50000 1.580 3.380 100000 2.900 6.740 200000 5.630 13.800 1000000 28.620 76.050 Running kaffe 0.8.3 on a 250 MHz UltraSparc 512 MB RAM: udvsort quicksort hobsort 1000 0.14 0.05 0.10 5000 1.96 0.12 0.26 10000 7.80 0.20 0.35 20000 31.05 0.30 0.65 30000 69.86 0.46 0.95 50000 194.99 0.72 1.63 100000 775.44 1.30 3.34 200000 2.63 6.93 1000000 13.56 38.63 10000000 145.04 510.47 Running kaffe 0.8.4 on a Linux 133 MHz Pentium (Dell) with 128 MB RAM: udvsort quicksort hobsort 1000 0.28 0.21 0.19 5000 2.86 0.28 0.34 10000 10.97 0.38 0.52 20000 43.07 0.63 0.99 30000 98.73 0.81 1.40 50000 276.35 1.27 2.24 100000 2.43 5.00 200000 4.77 9.82 1000000 23.59 52.20 10000000 *** *** *** = out of memory. Why? 10 M integers = 40 MB only. */