4 ms·
I recently tried to do that as well, but failed. Specifically, I have implemented AA sort [1] but for my use case the performance was about the same as std::sor
by Const-me 4y ago
I recently tried to do that as well, but failed. Specifically, I have implemented AA sort [1] but for my use case the performance was about the same as std::sort in C++, for the substantial code complexity cost. I reverted to std::sort. The code is on github [2]
Still, in that particular project the vectors being sorted are relatively small, typically under than 100kb, so I have only implemented their “inner” algorithm which works on a single CPU core. The complete AA sort algorithm was apparently designed for large vectors, and uses both SIMD and multithreading. Might be still useful for very long vectors.
[1] https://ieeexplore.ieee.org/document/4336211 https://ieeexplore.ieee.org/document/4336211
[2] https://github.com/Const-me/fTetWild/blob/master/MeshRepair/TetWild2/Utils/AASort/AASort.h https://github.com/Const-me/fTetWild/blob/master/MeshRepair/...
- janwas 4y agoWe also experimented with 4x4 networks but it's very helpful to use 256 or 512-bit SIMD. You might give our vqsort a try, it's quite a bit faster than std::sort: https://github.com/google/highway/blob/master/hwy/contrib/sort https://github.com/google/highway/blob/master/hwy/contrib/so...