Next: , Previous: Memory allocation, Up: VRRLIB

4.4 Sorter

The array sorter resides in lib/arraysort.h. This is not a normal header file, it is a generator of sorting routines. Each time you include it with parameters set in the corresponding preprocessor macros, it generates an array sorter with the parameters given. Consult the lib/arraysort.h header for details. The actual sorting algorithm used is a clever modification of the well-known QuickSort.

The main reason of implementing general sorting routines like this is that it is completely callback-free, thus speeding array sorting considerably.