Skip to content

Commit bd8c79f

Browse files
PERF: increase the minimum number of elements to use numexpr for ops from 1e4 to 1e6 (#40502)
1 parent 7e71c3b commit bd8c79f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/computation/expressions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141

4242
# the minimum prod shape that we will use numexpr
43-
_MIN_ELEMENTS = 10000
43+
_MIN_ELEMENTS = 1_000_000
4444

4545

4646
def set_use_numexpr(v=True):

pandas/tests/test_expressions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
)
1313
from pandas.core.computation import expressions as expr
1414

15-
_frame = DataFrame(np.random.randn(10000, 4), columns=list("ABCD"), dtype="float64")
15+
_frame = DataFrame(np.random.randn(1000000, 4), columns=list("ABCD"), dtype="float64")
1616
_frame2 = DataFrame(np.random.randn(100, 4), columns=list("ABCD"), dtype="float64")
1717
_mixed = DataFrame(
1818
{

0 commit comments

Comments
 (0)