BenchmarkTools.jl icon indicating copy to clipboard operation
BenchmarkTools.jl copied to clipboard

A better way to inspect the code of the benchmark loop/kernel

Open yuyichao opened this issue 8 years ago • 1 comments

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...

yuyichao avatar May 15 '16 00:05 yuyichao

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...

yuyichao avatar May 15 '16 00:05 yuyichao