The $ is a particular feature of the BenchmarkTools.jl package, and only valid inside its macros (like @btime). The problem is that global variables in expressions often lead to type instability and extra allocations, and the $ is used to replace such variables/expressions via āinterpolationā. See here for a description of this feature.
when using BenchmarkTools to time myfunction(x), the x gets a $ in front of itself so the timing macro interprets it as if it were being used in a call rather than as a value given once, at the setup for benchmarking @btime myfunction($x)