I tried checking for type instability with @code_warntype, but the results don’t look very clear to me:
Variables:
#self#::GeoStatsBase.#solve
problem::GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}}
solver::GeoStats.SeqGaussSim
#175::GeoStats.##175#176{GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}},GeoStats.SeqGaussSim}
var::Core.Box
V::Any
#temp#@_7::Int64
varreals::Array{_,1} where _
#temp#@_9::Int64
mapper::Core.Box
realizations::Dict{Symbol,Array{Array{T,1} where T,1}}
n::Int64
i::Int64
Body:
begin
mapper::Core.Box = $(Expr(:new, :(Core.Box)))
NewvarNode(:(realizations::Dict{Symbol,Array{Array{T,1} where T,1}}))
unless $(Expr(:invoke, MethodInstance for issubset(::Base.KeyIterator{Dict{Symbol,GeoStats.SGSParam}}, ::Base.KeyIterator{Dict{Symbol,DataType}}), :(GeoStats.⊆), :($(Expr(:new, Base.KeyIterator{Dict{Symbol,GeoStats.SGSParam}}, :((Core.getfield)(solver, :params)::Dict{Symbol,GeoStats.SGSParam})))), :($(Expr(:new, Base.KeyIterator{Dict{Symbol,DataType}}, :((Core.getfield)(problem, :targetvars)::Dict{Symbol,DataType})))))) goto 5
goto 7
5:
(Base.throw)(((Core.getfield)((Core.getfield)(Base.Main, :Base)::Any, :AssertionError)::Any)("invalid variable names in solver parameters")::Any)::Union{}
7: # line 79:
$(Expr(:inbounds, false))
# meta: location util.jl warn 585
SSAValue(11) = $(Expr(:foreigncall, :(:jl_alloc_array_1d), Array{Any,1}, svec(Any, Int64), Array{Any,1}, 0, 0, 0))
# meta: pop location
$(Expr(:inbounds, :pop))
$(Expr(:invoke, MethodInstance for #warn#521(::Array{Any,1}, ::Function, ::String, ::Vararg{String,N} where N), :(Base.#warn#521), SSAValue(11), :(GeoStats.warn), "SeqGaussSim is not fully implemented")) # line 82:
SSAValue(0) = $(Expr(:invoke, MethodInstance for GeoStats.SimpleMapper(::GeoStats.GeoDataFrame{DataFrames.DataFrame}, ::GeoStats.RegularGrid{Float64,2}, ::Dict{Symbol,DataType}), :(GeoStats.SimpleMapper), :((Core.getfield)(problem, :spatialdata)::GeoStats.GeoDataFrame{DataFrames.DataFrame}), :((Core.getfield)(problem, :domain)::GeoStats.RegularGrid{Float64,2}), :((Core.getfield)(problem, :targetvars)::Dict{Symbol,DataType})))
(Core.setfield!)(mapper::Core.Box, :contents, SSAValue(0))::GeoStats.SimpleMapper{GeoStats.RegularGrid{Float64,2}} # line 85:
$(Expr(:inbounds, false))
# meta: location dict.jl Type 104
SSAValue(17) = $(Expr(:invoke, MethodInstance for fill!(::Array{UInt8,1}, ::UInt8), :(Base.fill!), :($(Expr(:foreigncall, :(:jl_alloc_array_1d), Array{UInt8,1}, svec(Any, Int64), Array{UInt8,1}, 0, 16, 0))), :((Base.checked_trunc_uint)(UInt8, 0)::UInt8)))
SSAValue(15) = $(Expr(:foreigncall, :(:jl_alloc_array_1d), Array{Symbol,1}, svec(Any, Int64), Array{Symbol,1}, 0, 16, 0))
SSAValue(13) = $(Expr(:foreigncall, :(:jl_alloc_array_1d), Array{Array{Array{T,1} where T,1},1}, svec(Any, Int64), Array{Array{Array{T,1} where T,1},1}, 0, 16, 0))
# meta: pop location
$(Expr(:inbounds, :pop))
realizations::Dict{Symbol,Array{Array{T,1} where T,1}} = $(Expr(:new, Dict{Symbol,Array{Array{T,1} where T,1}}, SSAValue(17), SSAValue(15), SSAValue(13), 0, 0, :((Base.bitcast)(UInt64, (Base.check_top_bit)(0)::Int64)), 1, 0)) # line 88:
SSAValue(1) = (Core.getfield)(problem::GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}}, :targetvars)::Dict{Symbol,DataType}
$(Expr(:inbounds, false))
# meta: location dict.jl start 574
i::Int64 = $(Expr(:invoke, MethodInstance for skip_deleted(::Dict{Symbol,DataType}, ::Int64), :(Base.skip_deleted), SSAValue(1), :((Core.getfield)(SSAValue(1), :idxfloor)::Int64))) # line 575:
(Core.setfield!)(SSAValue(1), :idxfloor, i::Int64)::Int64
# meta: pop location
$(Expr(:inbounds, :pop))
#temp#@_9::Int64 = i::Int64
37:
unless (Base.not_int)((Base.slt_int)((Base.arraylen)((Core.getfield)(SSAValue(1), :vals)::Array{DataType,1})::Int64, #temp#@_9::Int64)::Bool)::Bool goto 61
var::Core.Box = $(Expr(:new, :(Core.Box)))
SSAValue(20) = $(Expr(:new, Pair{Symbol,DataType}, :((Base.arrayref)((Core.getfield)(SSAValue(1), :keys)::Array{Symbol,1}, #temp#@_9)::Symbol), :((Base.arrayref)((Core.getfield)(SSAValue(1), :vals)::Array{DataType,1}, #temp#@_9)::DataType)))
SSAValue(21) = $(Expr(:invoke, MethodInstance for skip_deleted(::Dict{Symbol,DataType}, ::Int64), :(Base.skip_deleted), SSAValue(1), :((Base.add_int)(#temp#@_9, 1)::Int64)))
SSAValue(3) = SSAValue(20)
SSAValue(22) = (Base.getfield)(SSAValue(3), 1)::Symbol
SSAValue(23) = (Base.add_int)(1, 1)::Int64
SSAValue(5) = SSAValue(22)
(Core.setfield!)(var::Core.Box, :contents, SSAValue(5))::Symbol
SSAValue(24) = (Base.getfield)(SSAValue(3), 2)::DataType
SSAValue(25) = (Base.add_int)(2, 1)::Int64
#temp#@_9::Int64 = SSAValue(21) # line 89:
#175::GeoStats.##175#176{GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}},GeoStats.SeqGaussSim} = $(Expr(:new, GeoStats.##175#176{GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}},GeoStats.SeqGaussSim}, :(problem), :(solver), :(var), :(mapper)))
SSAValue(18) = (Core.getfield)(problem::GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}}, :nreals)::Int64
SSAValue(8) = $(Expr(:new, UnitRange{Int64}, 1, :((Base.select_value)((Base.sle_int)(1, SSAValue(18))::Bool, SSAValue(18), (Base.sub_int)(1, 1)::Int64)::Int64)))
SSAValue(9) = $(Expr(:new, Base.Generator{UnitRange{Int64},GeoStats.##175#176{GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}},GeoStats.SeqGaussSim}}, :(#175), SSAValue(8)))
varreals::Array{_,1} where _ = $(Expr(:invoke, MethodInstance for collect(::Base.Generator{UnitRange{Int64},GeoStats.##175#176{GeoStatsBase.SimulationProblem{GeoStats.GeoDataFrame{DataFrames.DataFrame},GeoStats.RegularGrid{Float64,2}},GeoStats.SeqGaussSim}}), :(Base.collect), SSAValue(9))) # line 91:
SSAValue(19) = ((Core.getfield)(var::Core.Box, :contents)::Any => varreals::Array{_,1} where _)::Pair{_,_} where _ where _
(Base.setindex!)(realizations::Dict{Symbol,Array{Array{T,1} where T,1}}, (Core.getfield)(SSAValue(19), :second)::Any, (Core.getfield)(SSAValue(19), :first)::Any)::Dict{Symbol,Array{Array{T,1} where T,1}}
59:
goto 37
61: # line 95:
return $(Expr(:new, GeoStatsBase.SimulationSolution{GeoStats.RegularGrid{Float64,2}}, :((Core.getfield)(problem, :domain)::GeoStats.RegularGrid{Float64,2}), :(realizations)))
end::GeoStatsBase.SimulationSolution{GeoStats.RegularGrid{Float64,2}}