BenchmarkTools.jl
BenchmarkTools.jl copied to clipboard
A better way to inspect the code of the benchmark loop/kernel
Doing benchmark correctly sometimes involving making sure there's no additional overhead (e.g. due to accidental use of global variables) and the operation being benchmarked isn't optimized out (most likely due to constant propagation). In additional to documenting and giving examples about different ways to supply the parameters to the benchmark, I think it'll be useful to provide a way to show the code actually running in the loop.
This is also most relevant for cheap operations...
And I say "a better way" since it's probably possible now to use macroexpand
etc to figure out the right function and types to apply code_typed
and code_llvm
on but it's very hard to do...