I wrote an alternate THX-ing branch that reduces the number of Perl_get_context/dTHX calls to almost zero by keeping the interp * in NYTP_file struct, but when I tried to rebase it onto timbunce master, it seems timbunce master is broken ATM before any of my changes, so this PR is blocked on https://github.com/timbunce/devel-nytprof/pull/11 I guess unless you figure out how to procede. (merge my branch even though your master branch is failing???).