Revert "schwab: tried to change cache friendlyness for branch prediction - it seems it is very marginally worse and much worse if I move thid after the other branches"

This reverts commit fac01a81e35f4670aa6534aad9f1a7f4e5d692dd.
This commit is contained in:
Richard Thier 2025-05-09 02:36:15 +02:00
parent fac01a81e3
commit ac01d33519

View File

@ -242,17 +242,21 @@ static inline void schwab_sort(
/* But that would complicate codes above this point! */
/* Rem.: Order of operations try to be a cache-friendly as */
/* possible, but had to put loops changes to the end */
if(lolen < hilen) {
schwab_sort(array, low, plo - 1, state);
if(needmid) {
schwab_sort(array, plo, pmid - 1, state);
schwab_sort(array, pmid, phi - 1, state);
}
if(lolen < hilen) {
schwab_sort(array, low, plo - 1, state);
low = phi;
/* high = high; */
} else {
schwab_sort(array, phi, high, state);
if(needmid) {
schwab_sort(array, pmid, phi - 1, state);
schwab_sort(array, plo, pmid - 1, state);
}
/* low = low; */
high = plo - 1;