Skip to content

Commit

Permalink
remove getindex method that only exists to reduce invalidation
Browse files Browse the repository at this point in the history
the new method is slower
  • Loading branch information
KristofferC committed Mar 31, 2021
1 parent c0f8aef commit e30af53
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,6 @@ function getindex(A::AbstractArray, I...)
error_if_canonical_getindex(IndexStyle(A), A, I...)
_getindex(IndexStyle(A), A, to_indices(A, I)...)
end
# To avoid invalidations from multidimensional.jl: getindex(A::Array, i1::Union{Integer, CartesianIndex}, I::Union{Integer, CartesianIndex}...)
getindex(A::Array, i1::Integer, I::Integer...) = A[to_indices(A, (i1, I...))...]

function unsafe_getindex(A::AbstractArray, I...)
@_inline_meta
Expand Down

0 comments on commit e30af53

Please sign in to comment.