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

Construct the underlying map with_capacity #9

Open
apasel422 opened this issue Mar 19, 2015 · 5 comments
Open

Construct the underlying map with_capacity #9

apasel422 opened this issue Mar 19, 2015 · 5 comments

Comments

@apasel422
Copy link
Contributor

Since the capacity is restricted, it makes sense not to over- or underallocate on creation.

@Gankra
Copy link
Contributor

Gankra commented Mar 19, 2015

One potential argument against this is that you might never get to the limit.

@apasel422
Copy link
Contributor Author

In that case, LruCache should expose a way to set the maximum size separately from the maximum storage capacity.

@Gankra
Copy link
Contributor

Gankra commented Mar 19, 2015

s/maximum/minimum, but yeah that wouldn't be unreasonable.

@jstnlef
Copy link
Contributor

jstnlef commented Jul 17, 2016

I should be able to bang something out for this in the next hour or so if that's alright.

@apasel422
Copy link
Contributor Author

@jstnlef Go for it!

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

No branches or pull requests

3 participants