Understanding SnoopCompile timings

Hi,

First of all SnoopCompile.jl is such an amazing package! Thanks a lot @tim.holy .

After using it for a while there is still something I have trouble understanding:
When running @snoopi_deep f(), the exclusive/inclusive time of the root is indicated to be specialized as “Uniquely, its exclusive time corresponds to the time spent not in julia’s type inference (codegen, llvm_opt, runtime, etc).”

Is it to be understood that in this case, the inclusive time correspond to the total time spent on the execution (what @elapsed would return) and that the exclusive time corresponds to the time “not spent compiling” and hence inclusive - exclusive should correspond to the compilation time?

Thanks!

The inclusive time is the compilation + run time. As compilation includes type-inference, inclusive - exclusive is the total type-inference time. “Compilation time” would include the codegen/LLVM time, and that’s not measured by inclusive - exclusive.

Ah I see thanks, so that can be one of sources of discrepancy! Good to know!