-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object-based API #44
Comments
@mourner I've run the perf tests on FFX 46 and node v4.4.3 (using the
|
The latest commit in #45 should make insertion 10% faster on top of this. So looks like the change is definitely worth breaking the API. |
That sounds great! nice find.. |
Amazing results! API change looks good to me |
Great! API change is fine. |
+1 I would update the version Bokeh uses for sure. |
I'm considering a breaking API change that will make RBush more performant, but also more verbose, by replacing internal representation of bounding boxes from a 4-length array to a 4-property object. V8 handles object literals faster, and this also allows simplifying some internal logic. API-wise, this would look like this:
You would still be able to configure a custom format for inserted items, but would have to change
search
to use object literals for bbox instead of arrays in any case.The tree node JSON format would also change:
This is implemented in
memory-perf
branch that I'm increasingly using in my new algorithmic experiments. The benchmark results (in Node 6.2.2) are as follows:@twpayne @tschaub @mbloch @oscarlorentzon @vkurchatkin @bhousel — does this sound acceptable? I would bump the major version for this of course.
The text was updated successfully, but these errors were encountered: