You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that keyword arguments are slow (#9551), but I was surprised that not only are they not properly inlinable, @inline is actually slower and allocates more. On Julia 0.4.5
plus(x) = x+x
plus2(args...; kwargs...) =plus(args...; kwargs...)
@inlineplus3(args...; kwargs...) =plus(args...; kwargs...)
functionpluser2()
for _ in1:1000plus2(2) endendfunctionpluser3()
for _ in1:1000plus3(2) endend# After warming up...@timepluser2()
>0.000584 seconds (3.00 k allocations:140.781 KB)
@timepluser3()
>0.001023 seconds (5.00 k allocations:172.031 KB)
The text was updated successfully, but these errors were encountered:
I know that keyword arguments are slow (#9551), but I was surprised that not only are they not properly inlinable,
@inline
is actually slower and allocates more. On Julia 0.4.5The text was updated successfully, but these errors were encountered: