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

NFC: performance improvements #690

Closed
wants to merge 2 commits into from
Closed

Conversation

phkahler
Copy link
Member

@phkahler phkahler commented Sep 1, 2020

First commit changes the order of booleans in repeat-groups. This reduces the average time for the booleans by combining equal size pieces. It also does the transforms in parallel when build with OMP.

Second commit brings OpenMP to the remaining time-consuming part of boolean operations.

@@ -149,7 +149,7 @@ void Group::GenerateForStepAndRepeat(T *steps, T *outs, Group::CombineAs forWhat
std::vector<T> *scratch = &workA;
// do the boolean operations
while(n > 1) {
#pragma omp parallel for
//#pragma omp parallel for
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be commented?

Copy link
Member Author

Choose a reason for hiding this comment

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

It should probably be removed. Running that loop in parallel does work, but it ends up giving only 1 thread to each boolean operation which slows them down.

@phkahler
Copy link
Member Author

phkahler commented Sep 1, 2020

Address Sanitizer fails, probably an issue in SSurface::AddExactIntersectionCurve(). I'll try pulling the first commit into a separate PR, that one is simple enough it should pass.

@phkahler
Copy link
Member Author

phkahler commented Sep 6, 2020

Closing this, as it's been split into two separate PRs - one works, but the "simple" one still fails ASAN.

@phkahler phkahler closed this Sep 6, 2020
@phkahler phkahler deleted the speed branch November 24, 2020 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants