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

Speedup as in https://github.com/camelot-dev/camelot/issues/161 #94

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bosd
Copy link
Collaborator

@bosd bosd commented Aug 28, 2024

Speedup as in camelot-dev#161

For reference: numpy/numpy#16160

Seems still actual in 2024. My results:

import timeit
print(timeit.timeit('np.isclose(0.5, 0, atol=1e-4)', 'import numpy as np', number=10000))
# 0.2664242945611477
print(timeit.timeit('math.isclose(0.5, 0, abs_tol=1e-4)', 'import math', number=10000))
# 0.001325499266386032

Once ready, prefer to squash and merge.

More performance gains could potentially be realized. But let's do that in a separate PR.
atlanhq/camelot#427

@bosd bosd added the performance Performance label Aug 28, 2024
@bosd bosd mentioned this pull request Aug 28, 2024
23 tasks
@bosd bosd marked this pull request as ready for review August 28, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants