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?