in reply to Perl XS
You don't have to write XS code at all. Maybe the better solution would be to use excellent Inline::C module.
Also, post the slow Perl code, maybe we could optimize it a bit.
Edit: better link to Inline::C added.
In Section
Seekers of Perl Wisdom