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

BTreeMap for all the storage #122

Closed
kvark opened this issue Mar 15, 2017 · 4 comments

Comments

@kvark
Copy link
Member

commented Mar 15, 2017

It appears that BTreeMap is both efficient at removing/inserting elements as it is at iteration, giving mostly linear access and combining the benefits of vectors and maps. It seems like an ideal storage for components (see #119), thus I wonder... If we can go extreme and force all the storages to be BTreeMap. This would simplify some of the internals and some of the user code.

I haven't seen a good example of a user-defined storage type yet, so that might be the biggest question. If it's not useful, we can cut this ability.

@kvark kvark added the enhancement label Mar 15, 2017

@vitvakatu

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2017

IMO, user-defined storage is usefulness in case we will provide efficient storage out-of-the-box.
If you're sure about it, I can prepare a PR in a few days.

@OvermindDL1

This comment has been minimized.

Copy link

commented Mar 16, 2017

User defined storage for me was usually for highly optimized iteration, like for performing SSE or OpenCL over, over which a map would not suffice.

@kvark

This comment has been minimized.

Copy link
Member Author

commented Mar 20, 2017

Interesting, looks like the hashmaps work better for Postgres people: http://amitkapila16.blogspot.ca/2017/03/hash-indexes-are-faster-than-btree.html

@kvark

This comment has been minimized.

Copy link
Member Author

commented Apr 18, 2017

Considering this to be fixed by #119

@kvark kvark closed this Apr 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.