-
Notifications
You must be signed in to change notification settings - Fork 218
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
Make _params_to_array faster #1043
Conversation
Thanks @devmotion! I have this impulse to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Looks like we need a rebase before merging. |
Yes I was planning to try to make this even faster, but we can merge for now after the rebase and I will make another PR. |
5b64412
to
f9ecde6
Compare
I messed up the rebase. Let me fix the mess. |
Co-Authored-By: David Widmann <devmotion@users.noreply.github.com>
f9ecde6
to
e5d861f
Compare
This PR optimizes the
_params_to_array
function. In the following example, the running time ofsample
was cut down from 22 s to 8 s. Of these times, < 2 s is spent doing the sampling and the rest is saving the chain. There is a lot of room for improvement here. The 50000 iterations case terminates in 134 s now of which 16 s is sampling. Before this PR, it was too slow to even wait and time it.