Change qsort to std::sort and save 20ms