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

Add resizing algorithm #261

Open
matthiasbeyer opened this issue Sep 26, 2014 · 4 comments
Open

Add resizing algorithm #261

matthiasbeyer opened this issue Sep 26, 2014 · 4 comments

Comments

@matthiasbeyer
Copy link
Member

We may need a resizing algorithm for resizing the hashtable.

I don't know whether the user should be able to do this on his own, or the set implementation should do this on its own or if there should be both available and configurateable.

@neithernut
Copy link
Member

The library should do it. I was working on that issue recently, a few paragraphs will be added to the paper "soon".

@matthiasbeyer
Copy link
Member Author

I think a possibilty for the user to resize manually (or trigger a resize by a given factor) should be added. Use case: User creates set, knows he wants to add 100k elements. Triggering a re-size beforehand would increase the speed for the insertions a lot!

@neithernut
Copy link
Member

Nope, it would not.
The first resize is not before inserting 100 elements.
If you insert 100k elements, this would result in ln_2(1000), so about 10 resizes.
Compared to the insertio of 100k elements, this is peanuts.

@matthiasbeyer
Copy link
Member Author

And 100,000,000,000 elements would cause 25 resizes. So yes, we don't need it.

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