Doing this in the global scope leads to:
x = 1
f(t) = x * t
@btime [(x, f(10)) for i in 1:10000];
2.099 ms (10004 allocations: 468.89 KiB)
or, equivalently:
x = 1
f(x, t) = x * t
@btime [(x, f(x, 10)) for i in 1:10000];
2.177 ms (10004 allocations: 468.89 KiB)
Which is bad, as expected.