Revert "mormord sort further optimizations (for me slower - btw it might need to be called mormord-prenex-magyarsort at this point? I added a lot to it tbh like copied parts of thiersort for this to work)"

This reverts commit bccb1d070333a2d67eeba548bf8dca1db9b67fa5.
This commit is contained in:
Richard Thier 2024-04-11 17:19:10 +02:00
parent bccb1d0703
commit 32e98de308

View File

@ -196,17 +196,17 @@ static inline void mormord_sort_impl(uint32_t *a, int n, int j) noexcept {
uint32_t pivoti = 0;
while(pivoti < n) {
uint32_t radixval = morgrab(a[pivoti], j);
uint32_t targeti = --radics[radixval]; // already dec index for swap
uint32_t targeti = radics[radixval] - 1;
if(targeti > pivoti) {
// swap
uint32_t tmp = a[pivoti];
a[pivoti] = a[targeti];
a[targeti] = tmp;
// dec index
--radics[radixval];
} else {
// progress pivot
++pivoti;
// "undec" index
++radics[radixval];
}
}