Skip to content

Commit

Permalink
Apply no-kwarg optimization also if there are no arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed May 23, 2022
1 parent 059ce0e commit e6f8a7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ccalls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ end
(func::GapObj)(args...; kwargs...) = call_gap_func(func, args...; kwargs...)

# specialize non-kwargs versions, which increases performance
(func::GapObj)() = call_gap_func_nokw(func)
(func::GapObj)(a1) = call_gap_func_nokw(func, a1)
(func::GapObj)(a1, a2) = call_gap_func_nokw(func, a1, a2)
(func::GapObj)(a1, a2, a3) = call_gap_func_nokw(func, a1, a2, a3)
Expand Down

0 comments on commit e6f8a7d

Please sign in to comment.