Use crate indexing style trusted indices in `Zip`

Open
#566 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
performance

Research direction

Start by reviewing the existing Zip::indexed and apply paths, then read the linked crate-indexing documentation to understand the trusted-index approach. Determine whether Zip's shared-shape guarantee can support this safely and identify benchmarks or tests needed to show that bounds checks are removed without changing behavior.

Written by the indexing model from the issue text.

Description

enhancement

I have no idea if this can work, but with Zip we have a closed scope (apply) so we could potentially use crate indexing style trusted indices which don't require bounds checking.

This idea only applies if we are using indexes in Zip (like Zip::indexed), which we often aren't, but it it could be worthwhile to note. All producers in a Zip are checked to have the same shape, so a trusted index is valid for each of them.

Dominant language
Rust
Stars
4.3k
Forks
391
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-ndarray/ndarray

All issues in rust-ndarray/ndarray

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.