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

Mark Construct nogil so it can operate in parallel #54

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

thatch
Copy link
Contributor

@thatch thatch commented Dec 30, 2024

Since the values are already marshalled to C++ structures, this should be safe to drop the GIL. More methods could be added to this as well but I feel there's some upcoming refactor for #31/#32 that I'd let shake out first.

@thatch
Copy link
Contributor Author

thatch commented Dec 30, 2024

Note: this doesn't meaningfully change the total runtime for my use, there's still a lot of overhead from the marshalling.

@thatch
Copy link
Contributor Author

thatch commented Dec 30, 2024

timeline

Magenta is the Construct time (~150mS); it's dwarfed by the readback and classification [point-in-polygon] of vertices in my code but every little bit helps.

@fabanc fabanc self-assigned this Jan 1, 2025
Copy link
Owner

@fabanc fabanc left a comment

Choose a reason for hiding this comment

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

Very cool. I had never considered the no gil option. Thank you.

@fabanc fabanc merged commit fb697ee into fabanc:master Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants