mourner/rbush — pull request #11 by twpayne (2013-11-04 22:23:43+00:00)
Title: Experimental "all" codepath

This PR adds a short code path when it's known that all children of a node overlap the target bounding box.

Right now, this code is neither tested nor properly benchmarked. (How do I run the tests?).

Observations:
* In theory, this should improve performance with large bounding boxes by avoiding bounding box intersection tests and instead switching to fast native code (`Array.prototype.push.apply`) to collapse common cases.
* In practice, the limited testing that I've done indicates that it might not be worth it. I'm not sure why.
* In theory, this should work better with "real life" data where overlapping objects are less common. If objects overlap (e.g. in the `debug/perf.js` tests) then the advantage will be smaller.

At this stage: comments welcome! Maybe this helps, maybe it doesn't....