-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
uf_tree indexing fix #1740
base: develop
Are you sure you want to change the base?
uf_tree indexing fix #1740
Conversation
I measured performance like in the code for the
|
@@ -71,7 +78,14 @@ struct TracksBuilder | |||
{ | |||
// 1. We need to know how much single set we will have. | |||
// i.e each set is made of a tuple : (imageIndex, featureIndex) | |||
std::set<indexedFeaturePair> allFeatures; | |||
std::unordered_set<indexedFeaturePair, image_feature_hash> allFeatures; |
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.
Is it possible to have two similar indexedFeaturePair
at all?
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.
We should not since we are using a set
I made some benchmark on my machine and I found actually that your version is a bit slower. Here the results on various datasets.
So on my machine, your code is in average slower (20%) |
What targets your test included? Please note that in current version there is a cycle which should be removed before testing |
It could due to the compiler, I will test on another machine to see the impact. |
No description provided.