I am trying to benchmark the operations inside a function to have an idea where would be best to focus to try to optimize, and at the moment I do something similar to:
function foo() a = @btime rand(100) b = @btime rand(100) c = @btime $a .* $b + $a d = @btime $c .+ $a bar = @btime $d .- $b return bar end # foo
What would be a better way to do a similar benchmark?
Thanks in advance for the help ,