Quote:
Originally Posted by RobEasy
One question though, what the heck would we use this for?
|
Hint: it starts with 'sort', and ends with 'ing'.
Quote:
Originally Posted by Mocker
oo nice. Question for you people good with them sorts, do you know how to specifically target multiple cpu's in a sort in order to maximize their use (dual core up to large clusters)? I image it would mostly be useful for larger cpu intensive sorts, sort of a divide and conquer by setting multiple threads sorting one portion at a time ?
|
One possible approach might be to chop the data up into x subsets, and sort each subset on a separate CPU. However, I can only see this improving performance if a) your data set was large enough to justify the overhead (creating the threads for the separate processors, doing the initial data split, etc), b) if there were no significant issues with the CPUs sharing the memory bus (ie, each thread was more or less CPU-bound, and not memory bound, or if memory bound, could fit large chunks in an L1 or L2 cache), and c) the data would split into relatively equally-sized subsets (otherwise, you get one CPU sitting idle after sorting a dozen items, while another chugs away on several million).