Since you already have the C code, it shouldn't be too
hard to write an Inline::C version. Even if for some reason
you don't want to end up with an Inline::C version for
production or distribution, you could use the Inline::C
function for testing - both the C and the Perl function
should return the same values.
And it would also be interesting to benchmark the two.