Faster iterator for arbitrary order
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Review ArrayBase's existing fold, scalar_sum, and visit methods, then compare the proposed iter(), iter_mut(), indexed_iter(), and indexed_iter_mut() APIs with the listed Iterator and Itertools adapters. Done means the naming and arbitrary-order semantics are agreed and the adapters are implemented without requiring separate methods for every consumer.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
.iter() provides an iterator over all the elements, but it always iterates in logical order, which may be slow depending on the memory layout of the array. In some cases, however, the order of iteration doesn't matter. Recent issues regarding these types of cases include #466 and #468. Examples of methods where order doesn't matter include the most common uses of these from the Iterator trait
.fold().for_each().all()and.any().find().min(),.max(),.min_by(),.max_by(),.min_by_key(),.max_by_key().sum(),.product()
and these from Itertools
.cartesian_product().unique(),.unique_by().combinations().all_equal().foreach().fold_results(),.fold_options(),.fold1(),.tree_fold(),.fold_while().sorted(),.sorted_by(),.sorted_by_key().partition_map().into_group_map().minmax(),.minmax_by_key(),minmax_by()
We have already implemented some of these "arbitrary order" adapters as individual methods on ArrayBase, including .fold(), .scalar_sum(), and .visit(). However, it doesn't make sense to create separate methods for all of the possible iterator adapters.
As a result, I'd like to add "arbitrary order" .iter(), .iter_mut(), .indexed_iter(), and .indexed_iter_mut() methods designed to iterate in the fastest possible order so that we can hopefully get good performance with iterator adapters.
What does everyone think these "arbitrary order" iterators should be named?
I've thought of .iter_arbitrary() and .iter_unordered(), but those names seem somewhat unclear and unnecessarily verbose.
- Ngôn ngữ chính
- Rust
- Star
- 4.3k
- Fork
- 391
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rust-ndarray/ndarray
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rust-ndarray/ndarray#1612 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
rust-ndarray/ndarray#1617 · 1 bình luận ·
-
Stack overflow in `triu` Đang mởbug good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
rust-ndarray/ndarray#1615 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
rust-ndarray/ndarray#1610 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
rust-ndarray/ndarray#1609 ·
Tất cả issue của rust-ndarray/ndarray
Issue tương tự
-
risk:low runtime status:in-progress type:test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
EricSpencer00/Resilient#4835 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cesarferreira/stax#890 ·