8000 Storing more than 65535 items?... · Issue #20 · servo/uluru · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Storing more than 65535 items?... #20

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

Open
let4be opened this issue Jun 27, 2021 · 2 comments
Open

Storing more than 65535 items?... #20

let4be opened this issue Jun 27, 2021 · 2 comments

Comments

@let4be
Copy link
let4be commented Jun 27, 2021

Why such an arbitrary low limit?

cache.entries.capacity() < u16::max_value() as usize,

@let4be
Copy link
Author
let4be commented Jun 28, 2021

I guess it has to do with everything living on stack and each entry needs a prev/next indexes(u16) = 4 bytes vs 8 bytes if cache made larger...
Could probably benefit from u16 made into a generic parameter? (thread stack size can be configured)

@mbrubeck
Copy link
Collaborator

If you need to store thousands of items, uluru is probably not a very good solution, because performing a lookup requires scanning through every single item (in the worst case). This library is designed for caches that store a small number of items.

5350

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

2 participants
0