From: Adam Dickmeiss Date: Wed, 21 Nov 2012 10:25:48 +0000 (+0100) Subject: Improve pos of rset_create_or X-Git-Tag: v2.0.53~5 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=1ac398a3d8c593e1e361e696e26e8205587327b5 Improve pos of rset_create_or Simply subtract 1 from cur in sum calculation since there's a look ahead in the rsmultiandor algorithm. Makes a nice improvement in hit count (reducing ratio in fact). --- diff --git a/rset/rsmultiandor.c b/rset/rsmultiandor.c index 2ff6e23..f65039a 100644 --- a/rset/rsmultiandor.c +++ b/rset/rsmultiandor.c @@ -630,7 +630,8 @@ static void r_pos_x(RSFD rfd, double *current, double *total, int and_op) } else { - sum_cur += cur; + if (cur > 0) + sum_cur += (cur - 1); sum_tot += tot; } }