improve performance

This commit is contained in:
Vítor Santos Costa 2016-01-06 12:39:12 +00:00
parent 0eac6ac20b
commit 55c83fc2c8

View File

@ -1683,6 +1683,14 @@ static Term attvars_in_complex_term(register CELL *pt0, register CELL *pt0_end,
if (to_visit + 1024 >= (CELL **)AuxSp) {
goto aux_overflow;
}
{
CELL *npt0 = RepPair(d0);
if(IsAtomicTerm(Deref(npt0[0]))) {
pt0 = npt0;
pt0_end = pt0 + 1;
continue;
}
}
#ifdef RATIONAL_TREES
to_visit[0] = pt0;
to_visit[1] = pt0_end;
@ -1697,7 +1705,7 @@ static Term attvars_in_complex_term(register CELL *pt0, register CELL *pt0_end,
}
#endif
pt0 = RepPair(d0) - 1;
pt0_end = RepPair(d0) + 1;
pt0_end = pt0+2;
} else if (IsApplTerm(d0)) {
register Functor f;
register CELL *ap2;