I know that
@btime is better than builtin
@time because latest compute some overhead.
But in my scenario most of my code is computed only once, and I have to take into account this overhead. Also forcing
@btime to make only one sample, it make some tuning and require an interpolation that cause a faster execution of measured code snippet, but these things are not present in real code.
A MWE follows:
using BenchmarkTools function f() a = [1:100;] @time f = (a .< 70) @btime f = ($a .< 70) return nothing end BenchmarkTools.DEFAULT_PARAMETERS.samples = 1 f()
Then, it’s correct that in my scenario is better to use
@time (more similar to simple
toc(), confirmed reading implementation code of
@btime? or there are some other differences that return uncorrect measured times?
Many thanks in advance