projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abed890
)
Improve pos of rset_create_or
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 21 Nov 2012 10:25:48 +0000
(11:25 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 21 Nov 2012 10:25:48 +0000
(11:25 +0100)
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).
rset/rsmultiandor.c
patch
|
blob
|
history
diff --git
a/rset/rsmultiandor.c
b/rset/rsmultiandor.c
index
2ff6e23
..
f65039a
100644
(file)
--- 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;
}
}