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 commit is contained in:
parent
7d1d93a89c
commit
fac01a81e3
@ -242,21 +242,17 @@ static inline void schwab_sort(
|
|||||||
/* But that would complicate codes above this point! */
|
/* But that would complicate codes above this point! */
|
||||||
/* Rem.: Order of operations try to be a cache-friendly as */
|
/* Rem.: Order of operations try to be a cache-friendly as */
|
||||||
/* possible, but had to put loops changes to the end */
|
/* possible, but had to put loops changes to the end */
|
||||||
|
if(needmid) {
|
||||||
|
schwab_sort(array, plo, pmid - 1, state);
|
||||||
|
schwab_sort(array, pmid, phi - 1, state);
|
||||||
|
}
|
||||||
if(lolen < hilen) {
|
if(lolen < hilen) {
|
||||||
schwab_sort(array, low, plo - 1, state);
|
schwab_sort(array, low, plo - 1, state);
|
||||||
if(needmid) {
|
|
||||||
schwab_sort(array, plo, pmid - 1, state);
|
|
||||||
schwab_sort(array, pmid, phi - 1, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
low = phi;
|
low = phi;
|
||||||
/* high = high; */
|
/* high = high; */
|
||||||
} else {
|
} else {
|
||||||
schwab_sort(array, phi, high, state);
|
schwab_sort(array, phi, high, state);
|
||||||
if(needmid) {
|
|
||||||
schwab_sort(array, pmid, phi - 1, state);
|
|
||||||
schwab_sort(array, plo, pmid - 1, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* low = low; */
|
/* low = low; */
|
||||||
high = plo - 1;
|
high = plo - 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user