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