NVIDIA / NVIDIA/cudf

[FEA] Make use of cached_property in Cython classes once we update beyond 3.0.11

Open
#16,748 1 comment 0 reactions 0 assignees View on GitHub
feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**
Currently various cdef classes in cudf and pylibcudf do not leverage caching as much as they could. This is because, until recently, Cython did not support the `cached_property` decorator on cdef classes. This feature was implemented in https://github.com/cython/cython/pull/6179 and should be available in the next Cython release, either 3.0.12 or 3.1.0.

**Describe the solution you'd like**
Once cudf updates to requiring a sufficiently new version of Cython to build, we should start using `cached_property`. One of the first places this could be used is in the OrcColumnStatistics class in pylibcudf (see https://github.com/rapidsai/cudf/pull/16042/files/4328460b9f9eeaf88417d616f76a006c6e6e5ca8#r1741811824).

**Describe alternatives you've considered**
We could manually cache the values quite easily, but since the Cython feature is nearly available we may as well wait and save ourselves the effort.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.