-
Notifications
You must be signed in to change notification settings - Fork 292
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
Estimating hashmap occupied size #238
Comments
Not really. |
Is there a good formula to estimate this? I would assume something like: // HashMap
size_of::<HashMap>() + (size_of::<KeyType>() + size_of::<ValueType>() + size_of::<u64>()) * my_map.capacity()
// HashSet
size_of::<HashSet>() + (size_of::<ValueType>() + size_of::<u64>()) * my_set.capacity() But I am unsure if there is any extra per-element overhead, if the hash size is stored as u64, or if any of those items are dependent on Also curious how this formula compares with |
There is a |
Is there a way to estimate how much memory is occupied by a hashmap instance?
The text was updated successfully, but these errors were encountered: