mdbx: mdbx_node_search() micro-optimization.

Change-Id: I48064ca284aa89b16e418afdc20d09c5dd6e5cba
This commit is contained in:
Leonid Yuriev 2021-03-19 00:17:14 +03:00
parent dcb806302f
commit b3798a9116

View File

@ -12454,7 +12454,8 @@ static MDBX_node *__hot mdbx_node_search(MDBX_cursor *mc, const MDBX_val *key,
IS_LEAF(mp) ? "leaf" : "branch", IS_SUBP(mp) ? "sub-" : "",
mp->mp_pgno);
int low = IS_LEAF(mp) ? 0 : 1;
STATIC_ASSERT(P_BRANCH == 1);
int low = mp->mp_flags & P_BRANCH;
int high = nkeys - 1;
*exactp = false;
if (unlikely(high < low)) {