summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2008-05-07 14:45:17 +0000
committerroot <root>2008-05-07 14:45:17 +0000
commitcd7d60e294c5402f8dc10e46dcff788eaa280d7e (patch)
treea815ac64a42bd562adbc1542de0b82b919ce48c5 /ev.c
parentfc65001c25708f44ec3d7439712664e4ffa89a32 (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ev.c b/ev.c
index b576a86..5b8ba8d 100644
--- a/ev.c
+++ b/ev.c
@@ -810,6 +810,7 @@ downheap (WT *heap, int N, int k)
// find minimum child
if (expect_true (pos +3 < E))
{
+ /* fast path */
(minpos = pos + 0), (minat = (*minpos)->at);
if (pos [1]->at < minat) (minpos = pos + 1), (minat = (*minpos)->at);
if (pos [2]->at < minat) (minpos = pos + 2), (minat = (*minpos)->at);
@@ -817,9 +818,9 @@ downheap (WT *heap, int N, int k)
}
else
{
+ /* slow path */
if (pos >= E)
break;
-
(minpos = pos + 0), (minat = (*minpos)->at);
if (pos + 1 < E && pos [1]->at < minat) (minpos = pos + 1), (minat = (*minpos)->at);
if (pos + 2 < E && pos [2]->at < minat) (minpos = pos + 2), (minat = (*minpos)->at);