stepcompress: Favor higher add values when bisecting

Instead of splitting the available "add range" in half, try for add
values closer to the higher end of the range.  This heuristic seems to
result in better choices.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor committed 2016-12-19 11:20:38 -05:00
1 parent e4c4a4628b
commit 6efadf44d0
1 file changed
+1 -1
+1 -1
View File
@@ -202,7 +202,7 @@ compress_bisect_add(struct stepcompress *sc)
// Bisect valid add range and try again with new 'add'
if (minadd > maxadd)
break;
add = (minadd + maxadd) / 2;
add = maxadd - (maxadd - minadd) / 4;
}
return (struct step_move){ bestinterval, bestcount, bestadd };
}