Skip to content

Commit

Permalink
Fix performance bug: ensure to_index is inlined (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
c42f authored Aug 30, 2019
1 parent 1f5cd8c commit a28d934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ _axistraits() = ()
# indexing types to their integer or integer range equivalents using axisindexes
# It is separate from the `Base.getindex` function to allow reuse between
# set- and get- index.
to_index(A::AxisArray, I...) = _to_index(A, _axistraits(I...), I...)
@inline to_index(A::AxisArray, I...) = _to_index(A, _axistraits(I...), I...)

@generated function _to_index(A::AxisArray{T,N,D,Ax}, axtraits, I...) where {T,N,D,Ax}
ex = Expr(:tuple)
Expand Down

0 comments on commit a28d934

Please sign in to comment.