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

improve performance of find_stack_level #1279

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

MarcoGorelli
Copy link
Contributor

This has been improved in pandas, so bringing the improvement over https://github.com/pandas-dev/pandas/pull/45247/files

On master:

In [1]: from numpyro.distributions.discrete import PRNGIdentity

In [2]: %%timeit
   ...: PRNGIdentity()
   ...: 
   ...: 
<magic-timeit>:1: FutureWarning: PRNGIdentity distribution is deprecated. To get a random PRNG key, you can use `numpyro.prng_key()` instead.
3.64 ms ± 70.8 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

Here:

In [1]: from numpyro.distributions.discrete import PRNGIdentity

In [2]: %%timeit
   ...: PRNGIdentity()
   ...: 
   ...: 
<magic-timeit>:1: FutureWarning: PRNGIdentity distribution is deprecated. To get a random PRNG key, you can use `numpyro.prng_key()` instead.
5.68 µs ± 58.8 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)

Copy link
Member

@fehiepsi fehiepsi left a comment

Choose a reason for hiding this comment

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

Awesome!!! Thank you for the improvement!

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