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

Remove robin-hood-hashing dependency #628

Closed
wants to merge 1 commit into from

Conversation

imwints
Copy link
Contributor

@imwints imwints commented Sep 22, 2023

As per #617 using a specialized hash map/set is not worth the effort

@imwints imwints force-pushed the remove-robin-hood branch 3 times, most recently from b8ce335 to 8be413c Compare September 24, 2023 13:51
@aristocratos
Copy link
Owner

This one is gonna have to wait a little bit because of the amount of touched code.

But in the meantime, would you be willing to do some performance testing between std::unordered_map and the robin hood hash maps?

It would be interesting to see if we actually are giving up any performance with the switch.

@aristocratos
Copy link
Owner

Btw @nobounce, I hope you know that I really appreciate the interest you've taken in btop and your efforts to improve the code!
I sadly don't have as much free time as I used to.
But you and the others that graciously choose to contribute improvements and new functionality to btop is a great help! ❤

As per aristocratos#617 using a specialized
hash map/set is not worth the effort
@imwints
Copy link
Contributor Author

imwints commented Oct 14, 2023

It would be interesting to see if we actually are giving up any performance with the switch.

I had a look at it. I only looked at the memory footprint of btop itself. unordered_dense is around 400kB better than the current version with robin-hood-hashing. The standard implementation (of libstdc++) uses around 2M more RAM than the current implementation. In both this and the previous PR I deleted calls to compact() without a replacement. The proper function to replace it is rehash() in both the standard lib and unordered_dense. This saves some memory as well

@imwints imwints closed this Oct 14, 2023
@imwints imwints deleted the remove-robin-hood branch October 14, 2023 21:38
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

Successfully merging this pull request may close these issues.

2 participants