What kind of program? If it's some kind of library, it might indeed make sense to leave at least some functions in C, and write an XS wrapper for them (that, or
Inline::C, which does the hard work for you). At least you're already confident that the functions in C already work.