That's a good idea, but I think it would be hard in this case. The code includes a lot of calls to Perl functions (sv_catpvn, for example) and the relative performance of those calls is important.
-sam
Comment on Re^2: Profiling the C side of an Inline::C module