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. For step-and-repeat groups, create the copies first… #691

Closed
wants to merge 2 commits into from

Conversation

phkahler
Copy link
Member

@phkahler phkahler commented Sep 1, 2020

… (in parallel) and then combine them using unions of equal size shells to reduce the total time spent on booleans.

This was pulled out of the previous PR that failed ASAN.

… (in parallel) and then combine them using unions of equal size shells to reduce the total time spent on booleans.
@phkahler
Copy link
Member Author

phkahler commented Sep 1, 2020

@whitequark Looks like I need some help with initialization and cleanup of these vectors of shells. What is the right way?

@phkahler
Copy link
Member Author

I think I'm going to scrap this change. A better way to copy a shell N times involves less than 2*log(N) boolean operations vs the N-1 used now and also by this PR. Still need to figure out how to remap faces, but it should be significantly faster than the 10-30 percent improvement from this.

@phkahler phkahler closed this Sep 21, 2020
@rpavlik
Copy link
Contributor

rpavlik commented Sep 22, 2020

Sorry I apparently failed to submit my comment earlier: it was "I suspect you may need to clear one of the vectors here (or maybe clear scratch at the top of the loop) - not std::vector::clear() but the equivalent thing that is in the internal list classes, that calls clear on each element."

@phkahler
Copy link
Member Author

Sorry I apparently failed to submit my comment earlier: it was "I suspect you may need to clear one of the vectors here (or maybe clear scratch at the top of the loop) - not std::vector::clear() but the equivalent thing that is in the internal list classes, that calls clear on each element."

@rpavlik Thanks. I didn't know there was such a thing :-) I found a solution in PR #709 which seems to not leak. It still seems like the old version leaves one sshell lying around, as does my new one. That must clean up when it goes out of scope.

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