Skip to content

Commit 77f96ec

Browse files
committed
Speed up extrapolation by eliminating splat penalty
1 parent b86fad2 commit 77f96ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/extrapolation/extrapolation.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ and indices. The heavy lifting is done by the `extrap_prep` function; see
5050
function getindex_impl{T,N,ITPT,IT,GT,ET}(etp::Type{Extrapolation{T,N,ITPT,IT,GT,ET}}, xs...)
5151
coords = [Symbol("xs_",d) for d in 1:N]
5252
quote
53+
$(Expr(:meta, :inline))
5354
@nexprs $N d->(xs_d = xs[d])
5455
$(extrap_prep(ET, Val{N}()))
5556
etp.itp[$(coords...)]
@@ -66,6 +67,7 @@ checkbounds(::AbstractExtrapolation,I...) = nothing
6667
function gradient!_impl{T,N,ITPT,IT,GT,ET}(g, etp::Type{Extrapolation{T,N,ITPT,IT,GT,ET}}, xs...)
6768
coords = [Symbol("xs_", d) for d in 1:N]
6869
quote
70+
$(Expr(:meta, :inline))
6971
@nexprs $N d->(xs_d = xs[d])
7072
$(extrap_prep(Val{:gradient}(), ET, Val{N}()))
7173
gradient!(g, etp.itp, $(coords...))

0 commit comments

Comments
 (0)