Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by MZSanford (Curate)
on Oct 23, 2002 at 16:21 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://207434]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found