You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PERF: optimize _libs.algos for SIMD auto-vectorization and GIL release
- diff_2d: use raw C pointers for inner loops so the C compiler can
auto-vectorize the subtraction (~20-25% faster for DataFrame.diff)
- take_2d_axis0/axis1: use raw C pointers for inner row copy/conversion
loops enabling auto-vectorization (~10% faster for cross-type reindex)
- nancorr: add no_nans fast path skipping per-element mask checks
- nancorr_spearman: add @cython.cdivision(True)
- rank_sorted_1d: add @cython.cdivision(True) to remove zero-division
checks from the hot ranking loop
- rank_1d: skip unnecessary putmask when check_mask is False
- pad/backfill/pad_inplace/pad_2d_inplace: release GIL for numeric types
- get_fill_indexer: release GIL
- unique_deltas: use C array instead of Python list to avoid GIL
interaction per unique delta
- is_monotonic: remove redundant assignments before break
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v3.1.0.rst
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,8 @@ Performance improvements
136
136
- Performance improvement in :func:`read_sas` for compressed SAS7BDAT files by reusing the decompression buffer instead of allocating per row (:issue:`47339`)
137
137
- Performance improvement in :func:`read_sas` when decoding strings (:issue:`47339`)
138
138
- Performance improvement in :func:`util.hash_pandas_object` for PyArrow-backed string and binary types by using PyArrow's ``dictionary_encode`` instead of converting to NumPy for factorization (:issue:`48964`)
139
+
- Performance improvement in :meth:`DataFrame.corr` and :meth:`DataFrame.cov` when data contains no NaN values (:issue:`64857`)
140
+
- Performance improvement in :meth:`DataFrame.diff` by using raw C pointers to enable auto-vectorization of the inner loop (:issue:`64857`)
139
141
- Performance improvement in :meth:`DataFrame.from_records` when passing a 2D :class:`numpy.ndarray` (:issue:`22025`)
140
142
- Performance improvement in :meth:`DataFrame.insert` when the number of blocks is small (:issue:`57641`)
141
143
- Performance improvement in :meth:`DataFrame.loc` with non-unique masked index (:issue:`56759`)
@@ -151,6 +153,7 @@ Performance improvements
151
153
- Performance improvement in datetime/timedelta unit conversion (e.g. ``datetime64[s]`` to ``datetime64[ns]``) (:issue:`35025`)
152
154
- Performance improvement in indexing a :class:`DataFrame` with a :class:`CategoricalIndex` of :class:`Interval` categories (:issue:`61928`)
153
155
- Performance improvement in indexing a :class:`MultiIndex` with a list-like indexer (:issue:`55786`)
156
+
- Performance improvement in indexing operations that use ``take_2d`` (e.g. :meth:`DataFrame.reindex`) by using raw C pointers to enable auto-vectorization of the inner row copy (:issue:`64857`)
154
157
- Performance improvement in partial-string indexing on a monotonic decreasing :class:`DatetimeIndex` or :class:`PeriodIndex` (:issue:`64811`)
155
158
- Performance improvement in plotting :class:`DatetimeIndex` with multiplied frequencies (e.g. ``"1000ms"``, ``"100s"``) (:issue:`50355`)
156
159
- Performance improvement in reading zip-compressed files (e.g. :func:`read_pickle`, :func:`read_csv`) on Python < 3.12 (:issue:`59279`)
0 commit comments