Hi all,
I found some strange behaviour when running my code. I open 2 clean julia
sessions and do the following:
# session 1
home = ENV["HOME"]
cd("$home/git/migration/julia")
include("src/mig.jl")
p = mig.Param(2)
m = mig.Model(p)
@time mig.solve!(m,p)
elapsed time: 9.358865389 seconds (236857932 bytes allocated)
# session 2
home = ENV["HOME"]
cd("$home/git/migration/julia")
include("src/mig.jl")
mig.mywrap()
elapsed time: 18.051932747 seconds (226522796 bytes allocated)
the definition of mywrap is
function mywrap()
p = mig.Param(2)
m = mig.Model(p)
@time mig.solve!(m,p)
end
I thought this is identical? I looked at the @profile of both sessions, and
the profile timings of mig.solve! (the main computation function) are
actually lower in session 2 (inside the wrap) than in session 1. I would
have expected the reverse?