|more useful options|
What is the difference: Calling a (c based) program OR inline c codeby baurel (Sexton)
|on Oct 15, 2008 at 11:55 UTC||Need Help??|
baurel has asked for the
wisdom of the Perl Monks concerning the following question:
Suppose I would like to improve the performance of a Perl program with the help of C. Is it correct, that I basically have the following two options:
1.) to call external (C based) programs from perl (with backticks, system(), open(), ...).
2.) to extend Perl with C (XS, Inline::C, ...).
I think approach 1.) is much more simpler. Could somebody maybe explain me the differences between these two solutions? Is there a threading problem if I call external programs? Is there less scaling capacity? Why going the hard way with extending Perl? Sorry for the bad english...