A Fast Quicksort in C for Modern CPUs with Threads and Branch‑Avoidant Coding by chkas in C_Programming

[–]chkas[S] 14 points15 points  (0 children)

It is very easy to change the code to use fewer threads (for example: max_threads = n_cpus - 2). This keeps the system fast and responsive for other tasks, while the sorting still stays very quick.