6ba3bb46a4
Instead of qsort() it's possible to use g_ptr_array_sort_with_data() with similar performance. Unfortunately it seems there's no bsearch_with_data() anywhere so the patch uses a modified bsearch() implementation from libc (still probably cleaner than passing arguments using static variables).