On lines 28-44, we can potentially speed up the calculation by reducing the
number of if/else checks.
Since INCLUSIVE and EXCLUSIVE are ints 0 and 1, respectively, we can write
the code like this:
if (objects[object]){
return 1-mode;
} else {
return mode;
}
I am unsure if 1-mode is faster than if check, but we can profile it to
make sure. In any case, the else case should be faster.
This makes the code harder to read, :-( but might help speed up code that
relies on ViewportObjectFilters...
Original issue reported on code.google.com by ron...@gmail.com on 30 Jan 2009 at 6:29
Original issue reported on code.google.com by
ron...@gmail.com
on 30 Jan 2009 at 6:29