My package Strided.jl seems to give type inference a very hard time, which becomes even worse in packages that depend on it (like TensorOperations.jl).

I know about packages like SnoopCompile.jl and PackageCompiler.jl, but rather than just trying to precompile every possible combination of arguments (which is essentially hopeless, and also does not solve the full problem), I would like to redesign certain parts such that they are more friendly to type inference. Hence, I would like to explore where the problems lie and perform some time measurements of the type inference process.

Is there a recommended workflow for this? I seem to find little documentation, also about what the individual methods (`typeinf_ext`

, `typeinf_code`

, `typeinf_type`

, `typeinf_edge`

, `typeinf`

) do. There seems to be some utility in Core.Compiler, a macro `@timeit`

which does not seem to do anything? How is this supposed to be used?

Iâ€™ve read the `Inference`

page in the dev docs and the two blog posts linked to, but this does not help me with such practical questions.