Skip to content

PERF: increase the minimum number of elements to use numexpr for ops from 1e4 to 1e6 #40502

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/computation/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}

# the minimum prod shape that we will use numexpr
_MIN_ELEMENTS = 10000
_MIN_ELEMENTS = 1_000_000


def set_use_numexpr(v=True):
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
from pandas.core.computation import expressions as expr

_frame = DataFrame(np.random.randn(10000, 4), columns=list("ABCD"), dtype="float64")
_frame = DataFrame(np.random.randn(1000000, 4), columns=list("ABCD"), dtype="float64")
_frame2 = DataFrame(np.random.randn(100, 4), columns=list("ABCD"), dtype="float64")
_mixed = DataFrame(
{
Expand Down