-
Notifications
You must be signed in to change notification settings - Fork 41
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
Topic mappings in std::map instead of std::unordered_map #37
Comments
I don't believe there is any reason for
If you have a good reason for switching to |
Thanks for the explanation. I don't know if anyone is using the bridge like so, but in our case topics are mapped for each agent of our virtual arena. Because of that, during runtime the map could indeed get a lot larger as new agents are spawned/registered. This post does a quick benchmark between ordered and unordered maps. |
How many agents are we talking here? I would assume that it's still a matter of micro-seconds, let it be milli-seconds, difference between the two implementations. I feel like this somewhat tends towards premature optimization, but would still accept the change in your PR. |
Yes, this might be really close to premature optimization territory. I opened the issue mostly because it is a simple change (no refactoring needed). The goal is to deal with around 80k to 100k agents, we are probably going to hit other constraints so the bridge really needs to be as performant as possible. |
Greetings,
Is there a reason why the mappings are being stored in a std::map and not in a std::unordered_map? I can think of some reasons:
The text was updated successfully, but these errors were encountered: