diff --git a/src/mergesort.h b/src/mergesort.h index 3597db52fb7d67f7003114e625b21f8bfc407f3e..1df6cb4b819375e68fbdd2c745a4c7cee4a49009 100644 --- a/src/mergesort.h +++ b/src/mergesort.h @@ -22,13 +22,6 @@ // for improved performance, we employ an in-place insertion sort on // chunks of up to 64 elements and switch to merge sort from then on. -// compile with -DLMP_USE_MERGE_SORT to switch to a plain merge sort - -#if !defined(LMP_USE_MERGE_SORT) && !defined(LMP_USE_HYBRID_SORT) -#define LMP_USE_HYBRID_SORT -#endif - -#if defined(LMP_USE_HYBRID_SORT) // part 1. insertion sort for pre-sorting of small chunks static void insertion_sort(int *index, int num, void *ptr, @@ -48,7 +41,6 @@ static void insertion_sort(int *index, int num, void *ptr, } } } -#endif // part 2. merge two sublists @@ -78,8 +70,6 @@ static void merge_sort(int *index, int num, void *ptr, int chunk,i,j; -#if defined(LMP_USE_HYBRID_SORT) - // do insertion sort on chunks of up to 64 elements chunk = 64; @@ -92,10 +82,6 @@ static void merge_sort(int *index, int num, void *ptr, if (chunk >= num) return; -#else - chunk = 1; -#endif - // continue with merge sort on the pre-sorted chunks. // we need an extra buffer for temporary storage and two // pointers to operate on, so we can swap the pointers