yeah, we did it under the assumption that the threads are running on a machine with enough (but constant) cores so that scheduling can (theoretically) be done in constant time.
But then you're talking about parallel sorting, and O(n) parallel sorting is easy. Even parallel bubblesort is O(n). Optimal parallel sorting is actually sublinear.
View all comments
Show parent comment
1
u/Kered13 Aug 11 '20
It's actually O(n*log n + max). Thread scheduling isn't magic. In practice thread schedulers use a priority queue, which is O(n*log n).