Description
-
_libs/window both includes "skiplist.pyx" and cimports from skiplist. I don't know if it is necessary, but it is definitely confusing. (closed by simplify skiplist inclusion/cimport to be more cythonize-friendly #18420)
-
_libs/reshape.pyx is an 18 line stub that just includes reshape_helper.pxi. Could we just change reshape_helper.pxi.in to reshape.pyx.in? updateIt is correct as is.
-
src/reduce.pyx and src/inference.pyx are a minor PITA, should be merged directly into lib or made into their own modules.
-
src/numpy.pxd should be dropped, just defer to
np.get_include()
(closed by Remove src/numpy.pxd #19418) -
Only a small fraction of src/datetime/ is used outside of src/, a lot of it is only used by src/ujson/python/objToJSON.c. On the one hand it would be nice to separate out the pieces that are only needed by objToJSON. On the other hand, most of src/datetime is copy/pasted from numpy, and diverging from the original is liable to cause headaches.
-
src/helper.h defines PANDAS_INLINE. Cython has a CYTHON_INLINE that AFAICT would be a drop-in replacement. I have no idea how one would do that.
-
src/skiplist.h has a duplicate definition of PANDAS_INLINE
-
pandas_datetimestruct should either be aliased to or replaced by npy_datetimestruct (closed by use npy_datetimestruct instead of pandas_datetimestruct #21886)
-
from libc.math cimport sqrt
is notnogil
, whereascdef extern from src/headers/math.h
... is. That appears to have a nontrivial perf impact. See simplify skiplist inclusion/cimport to be more cythonize-friendly #18420. Go through and make sure we're using the performant implementation.
Benchmarks (technically belongs elsewhere, but not worth opening a new issue)
- asv is particularly volatile on my machine, so this may be just me. But I'm consistently seeing these as outliers:
timeseries.AsOfDataFrame.time_asof
,timeseries.AsOfDataFrame.time_asof_nan
,timeseries.DatetimeIndex.time_dti_tz_factorize
,timeseries.DatetimeIndex.time_dti_factorize