mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Rewrite mightsee_more to manipulate the sets directly.
While using set operators was clearer, it was rather expensive (about 25s for gmsp3v2). qfvis now completes the map in about 695s (single threaded). About 15s faster than tyr for the same conditions (1 thread, level 4).
This commit is contained in:
parent
27bb337a60
commit
2ea143283c
1 changed files with 10 additions and 3 deletions
|
@ -234,9 +234,16 @@ static inline int
|
||||||
mightsee_more (set_t *might, const set_t *prev_might, const set_t *test,
|
mightsee_more (set_t *might, const set_t *prev_might, const set_t *test,
|
||||||
const set_t *vis)
|
const set_t *vis)
|
||||||
{
|
{
|
||||||
set_assign (might, prev_might);
|
unsigned i;
|
||||||
set_intersection (might, test);
|
set_bits_t more = 0;
|
||||||
return !set_is_subset (vis, might);
|
|
||||||
|
// might = intersection (prev_might, test)
|
||||||
|
// more = (might is not a subset of vis)
|
||||||
|
for (i = 0; i < SET_WORDS (might); i++) {
|
||||||
|
might->map[i] = prev_might->map[i] & test->map[i];
|
||||||
|
more |= might->map[i] & ~vis->map[i];
|
||||||
|
}
|
||||||
|
return more != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue