apache / apache/datasketches-python
Vectorize update()
- 主要語言
- Jupyter Notebook
- 星號
- 46
- 分支
- 9
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Looping in python is slow. We should enable `update()` with multiple inputs where C++ handles the iteration, for all sketches.
For sketches that take primitive types this is simple and can be done by overloading `update()`. For item containers it may be less straightforward since a list is a type of object, meaning an overloaded may treat the list as a single thing to ingest.
IIRC, the wrappers (both pybind11 and nanobind) iterate through the possible methods in the order ini which they were declared in the wrapper definition, which is not good for API design: Lack of transparency, internal rearranging of code can cause side-effects, etc. So we probably need a different method name. Then we run into the question of whether we should use an overload where practical and a different name where necessary or if we go for more consistency.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
首先檢視現有的 update() 進入點,以及每個 sketch 的 pybind11 與 nanobind wrapper 定義。判斷如何區分原始輸入與 item 容器,接著確定向量化是使用多載還是獨立的方法名稱。完成的標準是所有 sketch 都支援 C++ 端迭代,並提供一致且透明的 Python API。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- cpp, python
- 領域
- api, performance
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100