From 95b858a65f50804b992e0f1979057e63e587822b Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sat, 13 Aug 2016 08:03:55 -0500 Subject: [PATCH] Force inlining on indices(A, d) --- base/abstractarray.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index a4b6cbe6bda0b..452a7f1643d61 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -51,7 +51,11 @@ size{N}(x, d1::Integer, d2::Integer, dx::Vararg{Integer, N}) = (size(x, d1), siz Returns the valid range of indices for array `A` along dimension `d`. """ -indices{T,N}(A::AbstractArray{T,N}, d) = d <= N ? indices(A)[d] : OneTo(1) +function indices{T,N}(A::AbstractArray{T,N}, d) + @_inline_meta + d <= N ? indices(A)[d] : OneTo(1) +end + """ indices(A)