4 Various sorting algorithms.
9 =========== ===============================================
11 Makefile Automate building and cleanup.
12 data.py Generate random data for the 'data' file.
13 main.c/.h Command line framework for a sorting algorithm.
14 bubble.c Bubble sort algorithm for main.c/.h.
15 quicksort.c Quicksort algorithm for main.c/.h.
16 =========== ===============================================
25 which also builds a random data file 'data'. To build with the DEBUG
26 macro defined (to enable some stderr printouts in main.c), run
30 Remove auto-generated files with
43 Timing 8191 data points on my 571 MHz netbook with
45 $ time ./bubble data > /dev/null
46 $ time ./quicksort data > /dev/null
48 quicksort takes 0.075 s and bubble takes 3.994 s.
50 On ordered data bubble does much better
52 $ time ./bubble ordered-data > /dev/null
53 $ time ./quicksort ordered-data > /dev/null
55 quicksort takes 0.048 s and bubble takes 0.046 s.
57 You can generate scaling graphs for all executables built by the
62 which generates `*-scaling.dat` and `*-scaling.png` for each