apache / apache/datasketches-python
Vectorize update()
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 46
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách xem xét các điểm vào update() hiện có và các định nghĩa wrapper pybind11 và nanobind cho từng sketch. Xác định cách phân biệt đầu vào nguyên thủy và các container chứa item, sau đó quyết định liệu vectorization sử dụng overload hay một tên phương thức riêng. Hoàn tất khi tất cả các sketch hỗ trợ việc lặp ở phía C++ với một Python API nhất quán và trong suốt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, python
- Lĩnh vực
- api, performance
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100