Julia 중급
Anthony Markham
Quantitative Developer
function my_function()
x = Vector{Char}()
for i in "Anthony"
push!(x, i)
end
println(x)
end
['A', 'n', 't', 'h', 'o', 'n', 'y']
장점:
단점:
@time my_function()
@time my_function()
0.278266 seconds (110.66 k allocations: 6.343 MiB, 99.79% compilation time)
0.000493 seconds (100 allocations: 3.281 KiB)
왜 @time보다 @benchmark를 쓸까요?
samples 수 등 많은 파라미터를 조정 가능@benchmark my_function

Julia 중급