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

Improve Runtime by reshaping the DataAssociation #411

Open
wants to merge 1 commit into
base: tiziano/reduce_allocations
Choose a base branch
from

Conversation

tizianoGuadagnino
Copy link
Collaborator

@tizianoGuadagnino tizianoGuadagnino commented Dec 4, 2024

Motivation

By simply switching the Correspondences to a tbb::concurrent_vector and performing the DataAssocation with a parallel_for instead of using a reduction, the pipeline's runtime decreased by 25% when I ran it in a single thread. The fantastic side effect is that the code is also much more readable.

Results

Main

runtime_warehouse_medium_main

This PR

runtime_warehouse_medium_pr

This is a follow-up PR from #410

@tizianoGuadagnino tizianoGuadagnino changed the base branch from main to tiziano/reduce_allocations December 4, 2024 18:03
},
// 2nd lambda: Parallel reduction
[](Correspondences a, const Correspondences &b) -> Correspondences {
a.insert(a.end(), //
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the problematic operation. It might require more investigation, though. Anyway, I feel that this reduction was inappropriate for the task here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by problematic? Regarding the runtime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants