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
Idea: Some way to specify the name of a special size parameter in a Benchmark, so (something like)
b =@benchmarkablebogosort(x) setup=(x=rand(n)) size=:n
res =run(b, 10)
would time bogosort with a size n=10. With this, a type BenchmarkSeries which encapsulates a Benchmark or BenchmarkGroup and a vector of sizes could let you investigate the size dependence of a benchmark:
function Base.run(bs::BenchmarkSeries{Benchmark})
map(bs.sizes) do size
time(run(bs.benchmarkable, size))
endend
This would help you answer questions like "how large should a vector be before algorithm A overtakes algorithm B?".
The text was updated successfully, but these errors were encountered:
Functionally similar, interface wise quite different. Say you're comparing four different algorithms, and you want to benchmark them for size 10, 100, 1000, 10_000, etc. Handling this with a benchmarkgroup becomes unwieldy, you can of course loop through and create dynamic keys, but that's a lot of boilerplate. And the display of your result will not automatically respect the inherent structure. A benchmarkseries could have a plot recipe connected to it, a numbered benchmarkgroup not really.
Idea: Some way to specify the name of a special
size
parameter in aBenchmark
, so (something like)would time
bogosort
with a sizen=10
. With this, a typeBenchmarkSeries
which encapsulates aBenchmark
orBenchmarkGroup
and a vector of sizes could let you investigate the size dependence of a benchmark:This would help you answer questions like "how large should a vector be before algorithm
A
overtakes algorithmB
?".The text was updated successfully, but these errors were encountered: