-
Notifications
You must be signed in to change notification settings - Fork 71
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
Ordset/orddict vs sets / dict #72
Comments
How soon do you need results/code for this? |
I've begun working on a benchmark to see what the difference is. As to whether we can be adaptive, I've not started working on that. |
And that's why you're the best. |
I read Elixir's HashDict last night, might be worth converting (and easy). Basically buckets are ordered and it starts with one bucket, splitting/rehashing when each bucket reaches 8 elements. So at small sizes it is basically orddict, scaling well up to sizes comparable with dict. |
I'm being rather slow. I've written something to allow you to swap which set/dict you use, depending on compile-time macros. Probably rather ugly. in branch I also started working on a basho_bench so i could work out which one is faster. I didn't get this finished, mostly because I tried to do too much in one module. https://gist.github.com/lenary/51f0ae9bb9ae1944fd27 I realise you're trying to get me to use HashDict. This would probably be sensible as i can see us running into issues with |
@lenary Not trying to get you to use HashDict, it was just a suggestion. I have it finished btw. 😄 |
So @seancribbs converted HashDict already: https://gist.github.com/seancribbs/7912656 Also he may be converting elixir's HashSet. We need to take a closer look at riak_dt_orswot.erl's types. |
Since this will be an internal format change, we'll need code to convert/upgrade after a cluster has upgraded with capabilities and such. Assigning to 2.1 |
Evaluate the cost and benefit of ord* vs * for internal data structures. Is it possible to be adaptive and move from one to the other when size dictates it is optimal (maybe as part of from_binary, if we store a size in the binary encoding?)
The text was updated successfully, but these errors were encountered: