Variables: #self#::#innerloop#3133{#bellman_obj} state::State{IdioState,AggState} EVspline::Dierckx.Spline1D model::Model{CRRA_Family,AggState} policy::PolicyFunctions{Array{Float64,6},Array{Int64,6}} OO::NW #3130::##3130#3134{State{IdioState,AggState},Dierckx.Spline1D,Model{CRRA_Family,AggState},PolicyFunctions{Array{Float64,6},Array{Int64,6}},NW,#bellman_obj}
Body: begin #3130::##3130#3134{State{IdioState,AggState},Dierckx.Spline1D,Model{CRRA_Family,AggState},PolicyFunctions{Array{Float64,6},Array{Int64,6}},NW,#bellman_obj} = $(Expr(:new, ##3130#3134{State{IdioState,AggState},Dierckx.Spline1D,Model{CRRA_Family,AggState},PolicyFunctions{Array{Float64,6},Array{Int64,6}},NW,#bellman_obj}, :(state), :(EVspline), :(model), :(policy), :(OO), :((Core.getfield)(#self#,:bellman_obj)::#bellman_obj))) SSAValue(0) = #3130::##3130#3134{State{IdioState,AggState},Dierckx.Spline1D,Model{CRRA_Family,AggState},PolicyFunctions{Array{Float64,6},Array{Int64,6}},NW,#bellman_obj} (Core.setfield!)((Core.getfield)(#self#::#innerloop#3133{#bellman_obj},:obj)::CORE.BOX,:contents,SSAValue(0))::##3130#3134{State{IdioState,AggState},Dierckx.Spline1D,Model{CRRA_Family,AggState},PolicyFunctions{Array{Float64,6},Array{Int64,6}},NW,#bellman_obj} return SSAValue(0) end::##3130#3134{State{IdioState,AggState},Dierckx.Spline1D,Model{CRRA_Family,AggState},PolicyFunctions{Array{Float64,6},Array{Int64,6}},NW,#bellman_obj}
0.069224 seconds (9.62 k allocations: 487.873 KB) 0.000007 seconds (39 allocations: 1.922 KB) 0.000006 seconds (29 allocations: 1.391 KB) 0.000011 seconds (74 allocations: 3.781 KB) 0.000009 seconds (54 allocations: 2.719 KB) 0.000008 seconds (54 allocations: 2.719 KB) 0.000008 seconds (49 allocations: 2.453 KB) 0.000007 seconds (44 allocations: 2.188 KB) 0.000007 seconds (44 allocations: 2.188 KB) 0.000006 seconds (39 allocations: 1.922 KB) 0.000007 seconds (39 allocations: 1.922 KB) 0.000006 seconds (39 allocations: 1.922 KB) 0.000005 seconds (34 allocations: 1.656 KB) 0.000005 seconds (34 allocations: 1.656 KB) 0.000004 seconds (29 allocations: 1.391 KB) 0.000004 seconds (24 allocations: 1.125 KB) 0.007399 seconds (248 allocations: 15.453 KB) 0.000009 seconds (30 allocations: 1.594 KB) 0.000004 seconds (25 allocations: 1.328 KB) 0.000004 seconds (25 allocations: 1.328 KB)
0.000010 seconds (70 allocations: 3.719 KB) 0.072703 seconds (41.74 k allocations: 1.615 MB)
A3 = rand(10, 10, 10);function test3(A, nx1, nx2, nx3) for i = 1:10_000_000 A[nx1, nx2, nx3] endend
A5 = rand(10, 10, 10, 10, 10);function test5(A, nx1, nx2, nx3, nx4, nx5) for i = 1:10_000_000 A[nx1, nx2, nx3, nx4, nx5] endend
A6 = rand(10, 10, 10, 10, 10, 10);function test6(A, nx1, nx2, nx3, nx4, nx5, nx6) for i = 1:10_000_000 A[nx1, nx2, nx3, nx4, nx5, nx6] endendfunction test6_fast(A, nx1, nx2, nx3, nx4, nx5, nx6) Asize = size(A) for i = 1:10_000_000 A[sub2ind(Asize, nx1, nx2, nx3, nx4, nx5, nx6 )] endend@time test3(A3, 1, 1, 1)@time test5(A5, 1, 1, 1, 1, 1)@time test6(A6, 1, 1, 1, 1, 1, 1)@time test6_fast(A6, 1, 1, 1, 1, 1, 1)