Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make eachindex more efficient for linear arrays #10704

Merged
merged 2 commits into from
Apr 2, 2015

Commits on Apr 2, 2015

  1. Make eachindex more efficient for linear arrays

    This greatly improves the ability to use `eachindex` in generic code.  For arrays with fast linear storage, `eachindex` now simply returns a `UnitRange` to linearly index the array. For arrays with slow linear access, this still returns a `CartesianRange`. In typical code constructs, the resulting elements from the iterators can be used identically.
    
    As a result, we can simplify AbstractArray cartesian iteration by moving all the complexity into the `eachindex` iterator.
    mbauman committed Apr 2, 2015
    Configuration menu
    Copy the full SHA
    57f9e66 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    adde889 View commit details
    Browse the repository at this point in the history