Skip to content

Commit a28d934

Browse files
authored
Fix performance bug: ensure to_index is inlined (#170)
1 parent 1f5cd8c commit a28d934

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ _axistraits() = ()
328328
# indexing types to their integer or integer range equivalents using axisindexes
329329
# It is separate from the `Base.getindex` function to allow reuse between
330330
# set- and get- index.
331-
to_index(A::AxisArray, I...) = _to_index(A, _axistraits(I...), I...)
331+
@inline to_index(A::AxisArray, I...) = _to_index(A, _axistraits(I...), I...)
332332

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

0 commit comments

Comments
 (0)