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

Replace hash_gid with FNV-1a #422

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Draft

Conversation

fuzzypixelz
Copy link
Contributor

hash_gid is called on Zenoh subscriber callbacks and shows up when profiling as a hot function. The use of std::stringstream seems to be relatively inefficient. A significant portion of hash_gid's running time is spend allocating & deallocating the std::stringstream.

Screenshot 2025-01-15 at 17 39 31

@fuzzypixelz
Copy link
Contributor Author

We seem to have many uses of std::unordered_map where the hashing is done manually instead of relying on the Hash template parameter. I'll revisit that before marking this pull request as ready for review.

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.

1 participant