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

Poor performance for large numpy arrays #5

Open
gimp-landg opened this issue Jan 16, 2019 · 0 comments
Open

Poor performance for large numpy arrays #5

gimp-landg opened this issue Jan 16, 2019 · 0 comments

Comments

@gimp-landg
Copy link

gimp-landg commented Jan 16, 2019

Given two sizeable numpy arrays with dtype=float64 and all differences below tolerance, recursive_eq is 100x slower than numpy.allclose, whereas they were supposed to exhibit comparable performance:

>>> a = numpy.zeros(int(1e7))
>>> %time numpy.allclose(a, a, atol=1, rtol=0)
CPU times: user 126 ms, sys: 60 ms, total: 186 ms
Wall time: 187 ms
>>> %time recursive_eq(a, a, abs_tol=1, rel_tol=0)
CPU times: user 11.3 s, sys: 2.08 s, total: 13.4 s
Wall time: 13.5 s
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

No branches or pull requests

1 participant