Thanks for this!
I initially tried renaming the c function to "form", which is the real name I'm using - but got an error about a previous declaration of Perl_form, so it looks like the functions are being put in a global namespace - however that's not a real problem - I just named it back to "root", then added a *form = \&root and it worked fine.
I found while trying to run my test suite, that the if( SvOK(sv) && SvTYPE(sv) == SVt_RV ) { } check was failing sometimes - I'm not sure why, so I'll have to investigate further. However, if I comment-out that check, all tests pass ok.
Running my usual profiling script shows the Inline::C version only runs about 2-3% faster (for total script runtime) - however, I think I'll be able to modify your code to replace a few other often-used methods - so hopefully, eventually, I'll be able to significantly speed up my program. - Thanks once again!