4 ms·
To be a little more speculative . . . if it is on GPU, is there some way of using rendering operations? The 'hidden-surface problem' in graphics has been descri
by hxa7241 15y ago
To be a little more speculative . . . if it is on GPU, is there some way of using rendering operations? The 'hidden-surface problem' in graphics has been described as basically a sorting problem: so represent each number as a triangle Z . . . well, maybe it would not be very fast, but you could do a few million at once!
- pyrtsa 15y agoSeven years ago, maybe. But today's GPUs do it easily in their programmable pipeline (shaders). And where conditionals are costly, you can use tricks like: float temp = min(x, y); x = max(x, y); y = temp; instead of the conditional swapping operations, to make the whole network sorting algorithm deterministic. (Edit: notice that min() and max() here are hardware operations.)