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

Properly document algorithm #454

Open
clarfonthey opened this issue Aug 20, 2023 · 0 comments
Open

Properly document algorithm #454

clarfonthey opened this issue Aug 20, 2023 · 0 comments

Comments

@clarfonthey
Copy link
Contributor

Note: this also applies to the libstd documentation, since it just reuses the same documentation exported in this crate.

Right now, the only documentation available for the hashbrown implementation, excluding the code itself (which is not documentation), is these this:

The hash table implementation is a Rust port of Google’s SwissTable. The original C++ version of SwissTable can be found here, and this CppCon talk gives an overview of how the algorithm works.

As far as I'm aware, the algorithm is not a clear-cut port of the C++ version, and there are definitely changes to how the internals work. Additionally, I don't consider the talk documentation, since while it may be an excellent introduction and provides motivation to the concept, it is in no way documenting how the table actually works.

While I understand that the purpose of a general hash map is to avoid concerning users with the details, I think that documenting how exactly this implementation works is useful to both those trying to implement their own variations, or those who wish to work with the source code and modify it in some way.

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

1 participant