julia> for _ in 1:100
@time resp=simulate_N_paths(1000,1001);
end
0.846531 seconds (144.91 k allocations: 773.162 MiB, 0.81% gc time, 61.57% compilation time)
0.668829 seconds (7.04 k allocations: 763.568 MiB)
0.672262 seconds (7.04 k allocations: 763.568 MiB, 1.03% gc time)
0.683861 seconds (7.04 k allocations: 763.568 MiB, 0.90% gc time)
0.716899 seconds (7.04 k allocations: 763.568 MiB, 0.56% gc time)
0.689040 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.675120 seconds (7.04 k allocations: 763.568 MiB)
0.697855 seconds (7.04 k allocations: 763.568 MiB, 0.32% gc time)
0.677286 seconds (7.04 k allocations: 763.568 MiB, 0.32% gc time)
0.669528 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.676805 seconds (7.04 k allocations: 763.568 MiB)
0.670247 seconds (7.04 k allocations: 763.568 MiB, 0.32% gc time)
0.664467 seconds (7.04 k allocations: 763.568 MiB, 0.24% gc time)
0.680086 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.664974 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.662659 seconds (7.04 k allocations: 763.568 MiB)
0.752201 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.666129 seconds (7.04 k allocations: 763.568 MiB, 0.24% gc time)
0.669314 seconds (7.04 k allocations: 763.568 MiB, 0.31% gc time)
0.670403 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.664434 seconds (7.04 k allocations: 763.568 MiB)
0.676214 seconds (7.04 k allocations: 763.568 MiB, 0.33% gc time)
0.669163 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.668347 seconds (7.04 k allocations: 763.568 MiB, 0.29% gc time)
0.664817 seconds (7.04 k allocations: 763.568 MiB)
0.665767 seconds (7.04 k allocations: 763.568 MiB, 0.31% gc time)
0.663841 seconds (7.04 k allocations: 763.568 MiB, 0.26% gc time)
0.664572 seconds (7.04 k allocations: 763.568 MiB, 0.26% gc time)
0.666120 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.663645 seconds (7.04 k allocations: 763.568 MiB)
0.674315 seconds (7.04 k allocations: 763.568 MiB, 0.32% gc time)
0.670455 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.675228 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.673772 seconds (7.04 k allocations: 763.568 MiB)
0.680937 seconds (7.04 k allocations: 763.568 MiB, 0.32% gc time)
0.666342 seconds (7.04 k allocations: 763.568 MiB, 0.23% gc time)
0.665388 seconds (7.04 k allocations: 763.568 MiB, 0.31% gc time)
0.665310 seconds (7.04 k allocations: 763.568 MiB, 0.29% gc time)
0.664449 seconds (7.04 k allocations: 763.568 MiB)
0.665434 seconds (7.04 k allocations: 763.568 MiB, 0.36% gc time)
0.666515 seconds (7.04 k allocations: 763.568 MiB, 0.31% gc time)
0.667780 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.688706 seconds (7.04 k allocations: 763.568 MiB, 0.29% gc time)
0.687049 seconds (7.04 k allocations: 763.568 MiB)
0.670405 seconds (7.04 k allocations: 763.568 MiB, 0.32% gc time)
0.669151 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.666605 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.663498 seconds (7.04 k allocations: 763.568 MiB)
0.668863 seconds (7.04 k allocations: 763.568 MiB, 0.34% gc time)
0.662439 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.668099 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.664490 seconds (7.04 k allocations: 763.568 MiB, 0.31% gc time)
0.672282 seconds (7.04 k allocations: 763.568 MiB)
0.665388 seconds (7.04 k allocations: 763.568 MiB, 0.33% gc time)
0.668240 seconds (7.04 k allocations: 763.568 MiB, 0.26% gc time)
0.667909 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.661000 seconds (7.04 k allocations: 763.568 MiB)
0.666812 seconds (7.04 k allocations: 763.568 MiB, 0.34% gc time)
0.673761 seconds (7.04 k allocations: 763.568 MiB, 0.23% gc time)
0.664866 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.663911 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.661808 seconds (7.04 k allocations: 763.568 MiB)
0.668902 seconds (7.04 k allocations: 763.568 MiB, 0.33% gc time)
0.666597 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.669327 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.665637 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.676440 seconds (7.04 k allocations: 763.568 MiB)
0.683051 seconds (7.04 k allocations: 763.568 MiB, 0.34% gc time)
0.668212 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.672266 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.673962 seconds (7.04 k allocations: 763.568 MiB)
0.672494 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.676360 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.671793 seconds (7.04 k allocations: 763.568 MiB, 0.27% gc time)
0.665337 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.663632 seconds (7.04 k allocations: 763.568 MiB)
0.669501 seconds (7.04 k allocations: 763.568 MiB, 0.37% gc time)
0.677144 seconds (7.04 k allocations: 763.568 MiB, 0.26% gc time)
0.667798 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.662609 seconds (7.04 k allocations: 763.568 MiB)
0.671711 seconds (7.04 k allocations: 763.568 MiB, 0.35% gc time)
0.666769 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.671648 seconds (7.04 k allocations: 763.568 MiB, 0.29% gc time)
0.670277 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.667317 seconds (7.04 k allocations: 763.568 MiB)
0.664070 seconds (7.04 k allocations: 763.568 MiB, 0.36% gc time)
0.666664 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.676183 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.668325 seconds (7.04 k allocations: 763.568 MiB, 0.28% gc time)
0.666195 seconds (7.04 k allocations: 763.568 MiB)
0.671963 seconds (7.04 k allocations: 763.568 MiB, 0.36% gc time)
0.665126 seconds (7.04 k allocations: 763.568 MiB, 0.25% gc time)
0.662345 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.665396 seconds (7.04 k allocations: 763.568 MiB)
0.668739 seconds (7.04 k allocations: 763.568 MiB, 0.35% gc time)
0.667000 seconds (7.04 k allocations: 763.568 MiB, 0.26% gc time)
0.665092 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.663765 seconds (7.04 k allocations: 763.568 MiB, 0.30% gc time)
0.664604 seconds (7.04 k allocations: 763.568 MiB)
0.664850 seconds (7.04 k allocations: 763.568 MiB, 0.33% gc time)
Looking at a system monitor, memory usage seems to be pretty stable throughout the run.