Open tzaeschke opened 7 years ago
m0/m1 computation in the quadtree iterators could be improved by replacing
for (int d = 0; d < center.length; d++) { m0 <<= 1; m1 <<= 1; if (max[d] >= center[d]) { m1 |= 1; if (min[d] >= center[d]) { m0 |= 1; } } }
with
for (int d = 0; d < center.length; d++) { m0 <<= 1; m1 <<= 1; //Extract signum bit m1 |= (Double.doubleToRawLongBits(center[d] - max[d]) >>> 63) & 1; m0 |= (Double.doubleToRawLongBits(center[d] - min[d]) >>> 63) & 1; }
m0/m1 computation in the quadtree iterators could be improved by replacing
with