Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Inline::C vs. XS vs. SWIG

by MZSanford (Curate)
on Oct 23, 2002 at 16:21 UTC ( #207434=note: print w/ replies, xml ) Need Help??


in reply to Inline::C vs. XS vs. SWIG

There are a few good books on the subject. Advandced Perl Programming (O'Reilly) covers how to use SWIG and XS both, and some of the trade-off's betwix them. Extending and Embedding Perl (Manning) gives a more in-depth treating of how to effectivly use the tools. Neither of these give a good comparrison with Inline::C.

I expect the next sentance is going to get me in rough with the other monks ... I, personally, don't like Inline::C. Inline::C takes the C code you provide, and compiles it in a sub directory, and then uses that. While this is sometimes fine, machines without compilers (Productions Unix hosts, or Win32 machines) do not work with this. With Inline::C there is a speed penalty the first time (when it compiles), but it reuses the compiled version thereafter. Inline::C is quick to write, but i don't think that makes it better. I suggest reading the perlxstut and desiding for yourself which is best suited for your skill level and needs.


from the frivolous to the serious


Comment on Re: Inline::C vs. XS vs. SWIG
Re: Re: Inline::C vs. XS vs. SWIG
by derby (Abbot) on Oct 23, 2002 at 16:29 UTC
    While this is sometimes fine, machines without compilers (Productions Unix hosts, or Win32 machines) do not work with this. With Inline::C there is a speed penalty the first time (when it compiles)

    You can do an XS style install (compile once, distribute) with Inline, check the faq

    -derby

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://207434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-02 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls