Skip to content
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

Use interleaved key value arrays #10

Open
mattbierner opened this issue Jan 3, 2016 · 1 comment
Open

Use interleaved key value arrays #10

mattbierner opened this issue Jan 3, 2016 · 1 comment

Comments

@mattbierner
Copy link
Owner

First step of trying out #4, using interleaved key, value arrays like the clojure implementation does.

This is supposed to improve cache performance since no extra memory indirection is required to access leaf nodes.

The downsides are that it complicates the implementation and will require rethinking the internal structures a lot. There is also no guaranteed this will actually improve performance on a modern Javascript engine. In fact, when I tried this out as a simple experiment, it made the performance worse.

V1.0 gets the API into a better state to support this type of change.

@mattbierner
Copy link
Owner Author

Simple benchmark shows that striding has little benefit on its own: http://jsperf.com/strided-array-iteration

It could enable more optimizations though so perhaps still worth investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant