Hello,
I have some issues that I did n’t get them well.
1- Why when using ·@btime, it is needed to used $ before the parameters?
2- Are A and B. below constant or non-constant variables?
A = randn(3,3); b = randn(3);
julia> @btime A\b
julia> @btime $A\$b
Check out this previous thread and the linked SO answer
In your example, $ is used to get a sense of the performance of A\b when A and b are either local and type-stable inside a function (including if they’re arguments) or they’re declared as const globals. It’s the former that most folks are interested in when benchmarking because that’s the happy path for high-performance Julia.
You’ve not declared A and b as const, so they’re not constant.
So, this 15ns is actually consumed during the compilation stage not during the run-time, and since the performance matters during runt-time, so $ is used, correct?
How can the BenchmarkTools distinguish between these two cases? Does it start to check the performance after the compilation stage is finished, at which the case (type) of variables is known?