We have compared two approaches to sort arrays by key, with the same key. One of those approaches uses thrust::zip_iterator and the other thrust::gather.
We have tested them in the case of sorting two arrays or three arrays. In all the two cases, the approach using thrust::gather has shown to be faster.
In the following, some timing results (NVIDIA GTX 960 card):
Timing in the case of 2 arrays for N = 1048576 zip_iterator = 7.34ms gather = 4.27ms Timing in the case of 3 arrays for N = 1048576 zip_iterator = 9.64ms gather = 4.22ms