Improve cost sorting
This commit is contained in:
parent
871a152b12
commit
666f3b433b
1 changed files with 3 additions and 6 deletions
|
|
@ -138,20 +138,18 @@ regetrank(SJ4_CONTEXT2) {
|
||||||
nkhcount = tmp = 0;
|
nkhcount = tmp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
for(count = khcount, kptr = kouhotbl; count--; kptr++) {
|
for(count = khcount, kptr = kouhotbl; count--; kptr++) {
|
||||||
|
|
||||||
if(!(kptr->rank)) {
|
if(!(kptr->rank)) {
|
||||||
if(tmp && kptr->mode && !(kptr->offs)) {
|
if(tmp && kptr->mode && !(kptr->offs)) {
|
||||||
kptr->rank = (u_char)tmp++;
|
kptr->rank = (u_char)tmp++;
|
||||||
} else
|
}
|
||||||
kptr->rank = (u_char)trank++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if((short)kptr->rank >= nrank)
|
else if((short)kptr->rank >= nrank)
|
||||||
kptr->rank += (u_char)nkhcount;
|
kptr->rank += (u_char)nkhcount;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
while(1) {
|
while(1) {
|
||||||
KHREC* best = NULL;
|
KHREC* best = NULL;
|
||||||
|
|
||||||
|
|
@ -165,7 +163,6 @@ regetrank(SJ4_CONTEXT2) {
|
||||||
|
|
||||||
if(best == NULL) break;
|
if(best == NULL) break;
|
||||||
|
|
||||||
best->rank = trank++;
|
best->rank = (u_char)trank++;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue