小编Lad*_*hia的帖子

Julia 中的分析/内存分配

我在 Julia 中运行一个空的双循环

Ngal = 16000000
function get_vinz()
    for i in 1:5
        print(i, " ")
        for j in i:Ngal
        end
    end
end
Run Code Online (Sandbox Code Playgroud)

@time Vinz() 的结果给了我

1 2 3 4 5   5.332660 seconds (248.94 M allocations: 4.946 GiB, 7.12% gc time)
Run Code Online (Sandbox Code Playgroud)

分配的5GB内存是做什么用的?

julia

2
推荐指数
1
解决办法
629
查看次数

标签 统计

julia ×1