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

Add optional forward and backward thread pools #28

Closed
wants to merge 2 commits into from
Closed

Conversation

sbarratt
Copy link
Collaborator

No description provided.

@akshayka
Copy link
Member

Want to write a benchmark to see whether reusing a thread pool noticeably improves performance?

@sbarratt
Copy link
Collaborator Author

Creating and destroying a ThreadPool object on my laptop takes 1ms.

Copy link
Member

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

In the future, if we find ourselves wanting to add more arguments, it might make sense to create a Workspace class containing things like threadpools. Then solve_and_derivative would take a handle to a workspace (which might be None), and there'd also be a function that would initialize and return a workspace that could be reused across calls.

@sbarratt
Copy link
Collaborator Author

sbarratt commented Feb 4, 2021

Closing this PR without merging. I don't think it's necessary at this point.

@sbarratt sbarratt closed this Feb 4, 2021
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.

None yet

2 participants