Hey, so this is what profview returns:
And setindex! is present as you mentioned.
Then checking using @code_warntype
@code_warntype SingleIterationCLL(n=10000,d=2);
MethodInstance for (::var"#SingleIterationCLL##kw")(::NamedTuple{(:n, :d), Tuple{Int64, Int64}}, ::typeof(SingleIterationCLL))
from (::var"#SingleIterationCLL##kw")(::Any, ::typeof(SingleIterationCLL)) in Main at c:\Users\Ahmed Salih\Documents\git\SPH-JULIA-DEVELOPMENT\src\MyOwnCellList\Step2_CellList_StaticArrays_GPU.jl:237
Arguments
_::Core.Const(var"#SingleIterationCLL##kw"())
@_2::NamedTuple{(:n, :d), Tuple{Int64, Int64}}
@_3::Core.Const(SingleIterationCLL)
Locals
n::Int64
d::Int64
r::Float64
T::Type{Float64}
@_8::Int64
@_9::Int64
@_10::Float64
@_11::Type{Float64}
Body::CLL
1 ββ %1 = Base.haskey(@_2, :n)::Core.Const(true)
β Core.typeassert(%1, Core.Bool)
β (@_8 = Base.getindex(@_2, :n))
ββββ goto #3
2 ββ Core.Const(:(@_8 = 20))
3 ββ %6 = @_8::Int64
β (n = %6)
β %8 = Base.haskey(@_2, :d)::Core.Const(true)
β Core.typeassert(%8, Core.Bool)
β (@_9 = Base.getindex(@_2, :d))
ββββ goto #5
4 ββ Core.Const(:(@_9 = 2))
5 ββ %13 = @_9::Int64
β (d = %13)
β %15 = Base.haskey(@_2, :r)::Core.Const(false)
ββββ goto #7 if not %15
6 ββ Core.Const(:(@_10 = Base.getindex(@_2, :r)))
ββββ Core.Const(:(goto %20))
7 ββ (@_10 = 0.1)
β %20 = @_10::Core.Const(0.1)
β (r = %20)
β %22 = Base.haskey(@_2, :T)::Core.Const(false)
ββββ goto #9 if not %22
8 ββ Core.Const(:(@_11 = Base.getindex(@_2, :T)))
ββββ Core.Const(:(goto %27))
9 ββ (@_11 = Main.Float64)
β %27 = @_11::Core.Const(Float64)
β (T = %27)
β %29 = (:n, :d, :r, :T)::Core.Const((:n, :d, :r, :T))
β %30 = Core.apply_type(Core.NamedTuple, %29)::Core.Const(NamedTuple{(:n, :d, :r, :T)})
β %31 = Base.structdiff(@_2, %30)::Core.Const(NamedTuple())
β %32 = Base.pairs(%31)::Core.Const(Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}())
β %33 = Base.isempty(%32)::Core.Const(true)
β Core.typeassert(%33, Core.Bool)
ββββ goto #11
10 β Core.Const(:(Base.kwerr(@_2, @_3)))
11 β %37 = Main.:(var"#SingleIterationCLL#31")(n, d, r::Core.Const(0.1), T::Core.Const(Float64), @_3)::CLL
ββββ return %37
I donβt see any βAnyβ, but it painted CLL red:
Is this bad?