You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the setup and teardown phases are executed for each sample, not each evaluation. Thus, the sorting example above wouldn't produce the intended results if evals/sample > 1 (it'd suffer from the same problem of benchmarking against an already sorted vector).
evals: The number of evaluations per sample. For best results, this should be kept consistent between trials. A good guess for this value can be automatically set on a benchmark via tune!, but using tune! can be less consistent than setting evals manually (which bypasses tuning). Defaults to BenchmarkTools.DEFAULT_PARAMETERS.evals = 1. If the function you study mutates its input, it is probably a good idea to set evals=1 manually.
So why is this a problem? PkgBenchmarks.jl calls tune! on every benchmarkable, thus changing evals leading to false
results when benchmarking mutating functions.
@vchuravy I think that's precisely what I addressed with #318. And also the reason why I think BenchmarkTools.jl v2.0 is long overdue. But I would appreciate a discussion around it, cause that would mean a breaking release for a very central package.
The docs state:
So looking at the example:
The docs also state:
So why is this a problem? PkgBenchmarks.jl calls
tune!
on every benchmarkable, thus changingevals
leading to falseresults when benchmarking mutating functions.
Not sure who maintains PkgBenchmarks these days but cc: @KristofferC @shashi @DilumAluthge
Potential solution would be to add a new parameter
tuneable
that does indeed skips tuning in all instances.The text was updated successfully, but these errors were encountered: