Skip to content

Conversation

@sbarratt
Copy link
Collaborator

No description provided.

@sbarratt sbarratt requested a review from akshayka November 21, 2019 22:26
@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.

2 participants