Skip to content

Commit 58c3f88

Browse files
committed
Specialize variadic arguments in _frule_overdub2 and alternative
1 parent bbe77dd commit 58c3f88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

profile.pb.gz

11.6 KB
Binary file not shown.

src/dual_context.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ end
110110
@inline isinteresting(ctx::TaggedCtx, f, args...) = false
111111
@inline isinteresting(ctx::TaggedCtx, f::typeof(Base.show), args...) = false
112112

113-
@inline function _frule_overdub2(ctx::TaggedCtx{T}, f::F, args::Vararg{Any,N}) where {T,F,N}
113+
@specialize_vararg 4 @inline function _frule_overdub2(ctx::TaggedCtx{T}, f::F, args...) where {T,F}
114114
# Here we can assume that one or more `args` is a Dual with tag
115115
# of type T.
116116

@@ -159,7 +159,7 @@ end
159159
end
160160
end
161161

162-
@inline function alternative(ctx::TaggedCtx{T}, f::F, args::Vararg{Any,N}) where {T,F,N}
162+
@specialize_vararg 4 @inline function alternative(ctx::TaggedCtx{T}, f::F, args...) where {T,F}
163163
# This method only executes if `args` contains at least 1 Dual
164164
# the question is what is its tag
165165

0 commit comments

Comments
 (0)