That’s exactly what @snoopi gives you: a list of (time, methodinstance) tuples, sorted by time. You should start at the end of the list so that you’re working on the most costly inference cases. I typically use @snoopi tmin=0.01 to ignore any inference cases that take less than 10ms (you can of course choose whatever threshold you want).
vcat was the problem. How did you determine that?
The cat in the names was a hint. But if you don’t know, then just do this:
using Cthulhu
@descend index_midsum([1,2,3,4,100])
If you don’t know Cthulhu (everyone should know @vchuravy’s Cthulhu, it’s one of my all-time favorite packages
), hit o to turn off optimization and w to turn on red “warn” coloring. Then start browsing the calls until you find type instability, or in this case the calls that showed up in the @snoopi results. I’ve posted a video on fixing invalidations, but starting just moments after 7:00 it’s basically a Cthulhu tutorial.