-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fqdn: Optimize KeepUniqueNames #13920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Not sure if this is of any actual significance, but KeepUniqueNames() is called from couple of places. Modify it to filter out duplicates in place so that no memory allocations are needed. Using naive search for duplicates instead of a map is about 5x faster for small sets of names. Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
39a647d
to
4d2c760
Compare
test-me-please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💥 🚀
test-gke |
retest-runtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 🚀
Not sure if this is of any actual significance, but KeepUniqueNames()
is called from couple of places. Modify it to filter out duplicates in
place so that no memory allocations are needed.
Using naive search for duplicates instead of a map is about 5x faster
for small sets of names.
Signed-off-by: Jarno Rajahalme jarno@covalent.io