+ // Vector::sort uses insertion sort, which is very slow for this data set.
+ // Use quicksort instead because we don't need a stable sort here.
+ // For more fun, GLibC took qsort_r from BSD but then decided to swap the
+ // order the last two parameters.
+#ifdef __GLIBC__
+ qsort_r(newPosToOriginalPos.editArray(), N, sizeof(size_t), config_sort, this);
+#else
+ qsort_r(newPosToOriginalPos.editArray(), N, sizeof(size_t), this, config_sort);
+#endif
+ //newPosToOriginalPos.sort(config_sort, this);