[bit-set] Micro-optimize process()
This commit is contained in:
parent
d77903db7b
commit
cf9b9929df
|
@ -540,21 +540,21 @@ struct hb_bit_set_t
|
||||||
b = nb;
|
b = nb;
|
||||||
for (; a && b; )
|
for (; a && b; )
|
||||||
{
|
{
|
||||||
if (page_map[a - 1].major == other.page_map[b - 1].major)
|
if (page_map.arrayZ[a - 1].major == other.page_map.arrayZ[b - 1].major)
|
||||||
{
|
{
|
||||||
a--;
|
a--;
|
||||||
b--;
|
b--;
|
||||||
count--;
|
count--;
|
||||||
page_map[count] = page_map[a];
|
page_map.arrayZ[count] = page_map.arrayZ[a];
|
||||||
page_at (count).v = op (page_at (a).v, other.page_at (b).v);
|
page_at (count).v = op (page_at (a).v, other.page_at (b).v);
|
||||||
}
|
}
|
||||||
else if (page_map[a - 1].major > other.page_map[b - 1].major)
|
else if (page_map.arrayZ[a - 1].major > other.page_map.arrayZ[b - 1].major)
|
||||||
{
|
{
|
||||||
a--;
|
a--;
|
||||||
if (passthru_left)
|
if (passthru_left)
|
||||||
{
|
{
|
||||||
count--;
|
count--;
|
||||||
page_map[count] = page_map[a];
|
page_map.arrayZ[count] = page_map.arrayZ[a];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -563,8 +563,8 @@ struct hb_bit_set_t
|
||||||
if (passthru_right)
|
if (passthru_right)
|
||||||
{
|
{
|
||||||
count--;
|
count--;
|
||||||
page_map[count].major = other.page_map[b].major;
|
page_map.arrayZ[count].major = other.page_map.arrayZ[b].major;
|
||||||
page_map[count].index = next_page++;
|
page_map.arrayZ[count].index = next_page++;
|
||||||
page_at (count).v = other.page_at (b).v;
|
page_at (count).v = other.page_at (b).v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -574,15 +574,15 @@ struct hb_bit_set_t
|
||||||
{
|
{
|
||||||
a--;
|
a--;
|
||||||
count--;
|
count--;
|
||||||
page_map[count] = page_map [a];
|
page_map.arrayZ[count] = page_map.arrayZ[a];
|
||||||
}
|
}
|
||||||
if (passthru_right)
|
if (passthru_right)
|
||||||
while (b)
|
while (b)
|
||||||
{
|
{
|
||||||
b--;
|
b--;
|
||||||
count--;
|
count--;
|
||||||
page_map[count].major = other.page_map[b].major;
|
page_map.arrayZ[count].major = other.page_map.arrayZ[b].major;
|
||||||
page_map[count].index = next_page++;
|
page_map.arrayZ[count].index = next_page++;
|
||||||
page_at (count).v = other.page_at (b).v;
|
page_at (count).v = other.page_at (b).v;
|
||||||
}
|
}
|
||||||
assert (!count);
|
assert (!count);
|
||||||
|
|
Loading…
Reference in New Issue